i tried but i got the same error in client ...acecess violation at address....in module webserver.exe...... baah dont work and dont creat the file....
i tried but i got the same error in client ...acecess violation at address....in module webserver.exe...... baah dont work and dont creat the file....
You're going to have to post the entire method where you are initialising the database.
:: AthenaOfDelphi :: My Blog :: My Software ::
ok i have ado querys and in design and i use this
webmodule.adologin.SQL.Text:='Select codentidade, nome, nipc, web_passwd from entidades where codentidade='''+AUserName+''' and web_passwd='''+APassword+'''';
webmodule.adologin.SQL.open;
dont have nothing more in my query....
in my client im using this ....
var rest:tcustomer;
begin
try
result := (httprio as iwebserver).login(edit1.text, edit2.text);
except
on e:exception do
showmessage(E.message);
end;
end;
It's impossible to follow exactly what's going on from the snippets you're posting I'm afraid.
Is the code part of a commercial project or is it something you'd just rather not get out into the wider world?
If not, then my suggestion is ZIP it ALL up (and I mean everything, server, client, everything) and either attach it here or if you don't want it to be public, mail it to me (athena at pascalgamedevelopment dot com) and I'll take a look at it.
:: AthenaOfDelphi :: My Blog :: My Software ::
i will send plz check it ... and tanx
There are many things that could be wrong.
First, I suggest you to drop everything BDE/ADO/DBX and go with Zeoslib, direct connection with native libraries, and open source.
Second, did your mysql is well configured? no local bindings, open for all, no network filters, no weird firewall rules.
Thirth, check your dlls, sometimes wrong versions throw weird errors, you need to double check your path for multiple dlls (happens to me once, two weeks wasted looking for the problem source, I wasn't aware of a very old dll in the delphi bin dir).
Last, do you a favor, drop iis and go apache.
can you help-me send me your first change, because i dont know what is Zeoslib.... thanx for your time....
Ok, this is well outside my comfort zone as I've never worked with this kind of web service... but having just created one in D2009 (I haven't run it, just created the project), I have a few observations.
In the created one (with example methods), all methods use STDCALL;, both on the interface in the class definition AND in the actual implementation too.
All the parameters in the example are passed in as CONST.
So in WebServerIntf.pas you have:-
Change the parameters to:-Code:IWebServer = interface(IInvokable) .... function Login(AUserName, APassword: string) : Tcustomer; stdcall; .... end;
The same applies to all of them.Code:IWebServer = interface(IInvokable) .... function Login(const AUserName:string;const APassword: string) : Tcustomer; stdcall; .... end;
And in WebServerImpl.pas change the interface to have:-
Change the parameters and add STDCALL to the implementation:-Code:function Login(const AUserName:string;const APassword: string) : Tcustomer; stdcall;
You may also need to use AnsiString instead of string... the example methods I had the IDE add pass strings around but they are AnsiString (this applies to the fields in objects). HTTP and CGI specs (at least as far as I know) do not support Unicode directly, so the strings etc. you receive from and send to the client can only ever be standard 8 bit chars, you have to handle character encoding yourself.Code:function Twebserver.Login(const AUserName:string; const APassword: string) : Tcustomer; stdcall;
The fact that it didn't create the log file (unless it's been created in some obscure location) suggests that the access violation is being raised by some of the inner workings, possibly relating to the parameter passing and types.
I hope this helps, if not, I'm afraid I've reached the limits of my knowledge on this type of service.
:: AthenaOfDelphi :: My Blog :: My Software ::
ok i will try but now only tomorow i will post the changes , thanx a lot, tomorow i will write to you...
i tried but dont work :s
Bookmarks