Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: [help] web server and ado connection

  1. #11
    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....

  2. #12
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    You're going to have to post the entire method where you are initialising the database.
    :: AthenaOfDelphi :: My Blog :: My Software ::

  3. #13
    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;

  4. #14
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    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 ::

  5. #15
    i will send plz check it ... and tanx

  6. #16
    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.

  7. #17
    can you help-me send me your first change, because i dont know what is Zeoslib.... thanx for your time....

  8. #18
    PGD Community Manager AthenaOfDelphi's Avatar
    Join Date
    Dec 2004
    Location
    South Wales, UK
    Posts
    1,245
    Blog Entries
    2
    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:-

    Code:
    IWebServer = interface(IInvokable)
    ....
      function Login(AUserName, APassword: string) : Tcustomer; stdcall;
    ....
    end;
    Change the parameters to:-

    Code:
    IWebServer = interface(IInvokable)
    ....
      function Login(const AUserName:string;const APassword: string) : Tcustomer; stdcall;
    ....
    end;
    The same applies to all of them.

    And in WebServerImpl.pas change the interface to have:-

    Code:
    function Login(const AUserName:string;const APassword: string) : Tcustomer; stdcall;
    Change the parameters and add STDCALL to the implementation:-

    Code:
    function Twebserver.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.

    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 ::

  9. #19
    ok i will try but now only tomorow i will post the changes , thanx a lot, tomorow i will write to you...

  10. #20
    i tried but dont work :s

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •