Results 1 to 8 of 8

Thread: connect ADO to ODBC

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    160

    connect ADO to ODBC

    hi
    I need very urgent help.

    I'm having trouble with connecting odbc on remote server, I get error following error : "sql server does not exist or access denied"
    I didn't set any username or password on server odbc.

    here's my code:

    CString = "Provider=MSDASQL;FileDSN=D:\Temporary Files\Temp Project\Test.dsn;"
    DBcon.Open CString

    Here's my dsn:

    [ODBC]
    DRIVER=SQL Server
    WSID=MOHAMMAD
    APP=Microsoft Open Database Connectivity
    SERVER=ALIREZA
    ADDRESS=192.168.0.2


    Any help is highly appreciated
    S. Mohammad Najafi

    PS : Error when I want to add the same thing =

    Microsoft SQL Server ODBC Driver Version 03.85.1022

    Running connectivity tests...

    Attempting connection
    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

    TESTS FAILED!

  2. #2
    Hyperactive Member goatsucker's Avatar
    Join Date
    Dec 2002
    Location
    Leeds, England
    Posts
    283
    Sounds like your DSN is the problem rather than your code. What Settings do you have in your DSN. Have you created your fileDSN yourself or have you copied it from another machine? I suspect that within your DSN you are referencing a server which has not been registered through the "Client Network Utility" which you can find in Start->Programs-.Microsoft Sql Server. This maps up the IP address of your server to an alias. This alias need to be used in your DSN. I suggest you look at your DSN and see if the alias used then is present in your client network utility. Better still create a new one which will allow you to test the connection before completion.
    After all "Rust Never Sleeps"

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    160
    thanks alot for your reply,
    I am almost disappointed of what I have ever done until now, I found out that ODBC cannot do anything like DBMS and what I am trying to do is sharing a database for everbody so everybody can update it but file sharing won't work well because they will load the whole file everytime and its not reasonable. so I made a odbc on remote pc and I just tried to connect it through the lan, but it doesn't work, some friend offered me to do winsock but I was thinking how much coding does it require, or is there any kind of compact sql server for ACCESSS Server which cand o my little job? or does everybody using SQL Server for distributed application?

    any help is highly appreciated

  4. #4
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    vbcodec


    Not exactly sure of what you want, but you can share an Access database on a server with others using Jet or ODBC. This is what alot of programmers distribute their apps with (its free to do so).

    Now when you get into doing this you will have to use record locking and transaction processing to keep users from clobbering each others updates.

  5. #5

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    160
    hi
    thanks for your reply, but can you tell me how do you do that ? any article or webiste you know/

    thanks alot

  6. #6
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    vbcodec



    Start here: http://www.vbforums.com/showthread.p...hreadid=262571


    You can also search the forum and the web for "SQL tranasction processing".

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Sep 2003
    Posts
    160
    Hi
    Thanks for your quick reply but I have difficulties to download your file , it comes only 120 bytes and there's nothing inside, and by the way except this tool , how really can you connect to your remote odbc ? do you have any sample project?

    your answers is highly appreciated
    S. Mohammad Najafi

  8. #8
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385
    vbcodec


    I fixed the problem with the download. It it a zip file of 53kb. It is complete with a project of how to use it as well. The web Page has info as to registering the ocx as well.


    You can download from here:

Posting Permissions

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



Click Here to Expand Forum to Full Width