×

Discussion Board

Results 1 to 15 of 15
  1. #1
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    How to connect with database

    Hi to all,
    I am using series-60 2nd ed fp2 and i want to connect my symbian application to my server machine after connecting this i want to access its database that is on sql server.
    I got that i can connect with server via HTTP socket connection but what should do for sql server.
    Please tell me the solution,

    Thanks

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to connect with database

    Quote Originally Posted by sulabh120881
    Hi to all,
    I am using series-60 2nd ed fp2 and i want to connect my symbian application to my server machine after connecting this i want to access its database that is on sql server.
    I got that i can connect with server via HTTP socket connection but what should do for sql server.
    Please tell me the solution,

    Thanks
    You have to write a server that takes the req. from client , uses that req. to query in the data base and send the result to client in a format that client can understand.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: How to connect with database

    Hi sulabh,

    You need to write a servlet or ASP and from there you can access database.

    Regards,
    Sudhakar

  4. #4
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    Thanks Rao and Sudhakar for your favorable reply.
    I want to write our application in symbian c++. Is there any way to write servlet type application in symbian c++.
    And to open a particular url what should i do .

    Thanks a lot

  5. #5
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: How to connect with database

    Hi,

    You need to write server application either using servlets in J2EE or using ASP in .net and host in server. There are plenty of source codes available in net and you need to just google for it.

    To open particular URL you can use HTTP GET either using socket or RHTTPSession .There are couple of posts given in this forum.

    All the best.

    Regards,
    Sudhakar

  6. #6
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: How to connect with database

    Quote Originally Posted by sulabh120881
    Thanks Rao and Sudhakar for your favorable reply.
    I want to write our application in symbian c++. Is there any way to write servlet type application in symbian c++.
    And to open a particular url what should i do .

    Thanks a lot
    You can Find a Client Symbian Code in SDK exmaple
    \Examples\appprots\exampleclient

  7. #7
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    Thanks to both of u, I am trying this with your reference and get back if any problem persist

    Thanks again

  8. #8
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    Hi to All,
    Finally i have developed a symbian client and a web based servlet and i can connect my client to servlet via RSocket Connection but have another issue. I need to send a string from my client to servlet and I dont know how to send this. this time i m using
    _LIT8(KDataToWrite,"GET /TimeProject/trylogin HTTP/1.0\xD\xA\xD\xA");
    sockfd.Write(KDataToWrite,iStatus);
    To connect with my servlet but if i want to send a string on this servlet like "myname" what should i do .
    Please tell me how can i do this

    Thanks in advance.

  9. #9
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: How to connect with database

    hi,

    You can append as a parameter to URL u r calling.

    for ex.

    _LIT8(KDataToWrite,"GET /TimeProject/trylogin?yourname=sulabh HTTP/1.0\xD\xA\xD\xA");

    -Sudhakar
    Regards,
    Sudhakar

  10. #10
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    hi
    I have a servlet that reads all value and print this on screen so i m sending a value and try to print this in my servlet side like...
    _LIT8(KDataToWrite,"GET /TimeProject/trylogin?success HTTP/1.0\xD\xA\xD\xA");

    but it is not working

  11. #11
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: How to connect with database

    hi,

    Values should be as a pair of parameter name and its corresponding value(....?parmname=Value)

    Regards,
    sudhakar
    Regards,
    Sudhakar

  12. #12
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    Quote Originally Posted by S.S.Sudhakar View Post
    hi,

    Values should be as a pair of parameter name and its corresponding value(....?parmname=Value)

    Regards,
    sudhakar
    m not getting
    if i want to send a message like "hello" only then what should i do ??

  13. #13
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    still waiting for reply please help me to resolve this out

  14. #14
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: How to connect with database

    Hi,

    Can you specify the problem clearly. i.e., what u wnat to communicate with server.
    Regards,
    Sudhakar
    Regards,
    Sudhakar

  15. #15
    Regular Contributor
    Join Date
    Nov 2006
    Posts
    128

    Re: How to connect with database

    Quote Originally Posted by S.S.Sudhakar View Post
    Hi,

    Can you specify the problem clearly. i.e., what u wnat to communicate with server.
    Regards,
    Sudhakar
    1: I just want to send a string to my servlet
    you told me that i should try
    _LIT8(KDataToWrite,"GET /TimeProject/trylogin?yourname=sulabh HTTP/1.0\xD\xA\xD\xA");
    this calls my servlet properly but not send "sulabh ".
    here what is "yourname"
    means where it should be declared.

    2: I want to recieve a string from servlet also.

Similar Threads

  1. database trouble
    By liafail in forum Symbian
    Replies: 6
    Last Post: 2005-12-28, 05:56
  2. Connect MySQL Database
    By ernestkok in forum Browsing and Mark-ups
    Replies: 1
    Last Post: 2004-03-22, 09:23
  3. How to connect Remote DataBase
    By rkpnaidu in forum Symbian
    Replies: 0
    Last Post: 2004-03-11, 13:45
  4. database problem
    By sridhar_ratna in forum Symbian
    Replies: 1
    Last Post: 2003-04-18, 09:07

Posting Permissions

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