Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SQL Server (or the lack of it) problems....

Options
  • 17-04-2001 4:27am
    #1
    Closed Accounts Posts: 1,322 ✭✭✭


    Hey all,

    To be honest I never thought I would have anything to post on the Admin thread, but I think this is the only place I would expect to get an answer.

    I am a Java programmer (student) working on the Win98/NT platforms. I am trying to write server side software to connect to a database. 2nite I ran in to problems because:

    - I am running a Java web server on this system (Win98)
    - The server program runs on the web server
    - the database system (Access) is running on the localhost

    What I cannot understand is that I cannot connect to the database from the server app, even when both server and client exist on the same machine. Just to make sure I was not ****ing up in the code I created a stand alone program (not a server one) that tried to connect to the local database (and it did!). I tried doing all the obvious things like specifying (/localhost, or /127.0.0.1) on the server on to see it that would help and still nothing.

    I think it has something to do with the Access Drivers in the Control Panel I have setup. It does say in there that, the drivers will only accept connections from local apps. Does this mean that I will need to get my hands on something like SQL Server?? So I can create a DB driver that can accept connections from remote hosts.

    I have encountered this problem and are rather ****ed off, since this is supposed to be an n-tier project. Any help would really be appreciated.

    Thanks in advance...
    :-phobos-)


Comments

  • Registered Users Posts: 18,484 ✭✭✭✭Stephen


    Have you tried the programming/webmaster boards yet?


  • Moderators, Social & Fun Moderators Posts: 10,501 Mod ✭✭✭✭ecksor


    *moves*

    He has now.


  • Moderators, Social & Fun Moderators Posts: 10,501 Mod ✭✭✭✭ecksor


    Actually, fancy showing the connection code and detailing how you set up the database connection?


  • Registered Users Posts: 2,494 ✭✭✭kayos


    Hold up here what I take you to mean is the following Your tring to get your Web Server to talk to a Database on the Client PC???? If this is so all I can say is WTF smile.gif To be honest I have never come across any problems connecting into a database with Web apps (mainly ASP) The best and easist thing to try is setting up a System DSN to your access db and try connecting using straight ADO in VBS or JScript if you can do that its your connection code otherwise I'm at a loss until I have a bit more info.

    kayos


  • Registered Users Posts: 932 ✭✭✭yossarin


    you does be having to set up the database file as a data source on your system - use the ODBC thingie in control pannel - make sure that the DS name is the same as the file, also the ODBC WILL have to remember any username/password you've put on the database.

    read up on JDBC - it'll have all of this stuff detailed
    also...after searches/etc. you might have problems 'cos of Access read/write locking, so you might have to get your code to explicitly release it [bad grammer, BAD]

    hope that helped the issue rather than confusing it

    [This message has been edited by yossarin (edited 17-04-2001).]


  • Advertisement
  • Registered Users Posts: 7,468 ✭✭✭Evil Phil


    When you specify the localhost to the server it will only connect to itself (the localhost). Would you not put the database on the same machine as the server, or is this what your doing? If the db is on the server then set up a system dsn (as already stated) on the client and use this to connect to the db. You made also need the MDAC if you don't have Access already installed on the server. Post some code so we can say hmmm and ohhh and come up with some suggestions.


Advertisement