ADO Connection Does Not Work W/ Same Parameters As DSN Connection

Folks,

Could you please help me with the following code? When the program gets to
the line that says:

      .Open userid:="myID", Password:="myPassword"

I get an error message saying "[Microsoft][ODBC Driver Manager] Data source
name not found and no default driver specified". What I can't figure out is
I'm not using a data source name and what do I need a default driver for?
I've already specified the driver and it's right where I said it was -- 
i.e., c:\dbodbc8.dll.

I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references are

* Microsoft ActiveX Data Objects 2.5 Library (c:\Program Files\Common
Files\Sysytem\ADO\msado15.dll)

* Microsoft Data Binding Collection VB 6.0 (SP4)
(c:\WINNT\System32\MSBND.DLL)

I created a DSN -- that worked -- and then looked at the registry to examine
the values I specified in order to transfer them to the connection string.
Curiously the entry for (Default) was (value not set).

Any help would be greatly appreciated.

TIA
Don

==================
Option Explicit

Private mcnADODB                As ADODB.Connection

Public Function MakeADOConnection( ) As ADODB.Connection

'Do stuff

    Set mcnADODB = New ADODB.Connection
    With mcnADODB
      .CursorLocation = adUseClient
      .ConnectionString = "AutoStop=yes;" & _
          "commlinks=sharedmemory;" & _
          "databasefile=c:\ooo.db;" & _
          "databasename=oes;driver=c:\dbodbc8.dll;" & _
          "integrated=no;start=dbeng8"
      .Mode = adModeRead
      .Open userid:="myID", Password:="myPassword"
    End With
    mblnConnected = True

'Do more stuff

End Function


0
Don
9/3/2003 10:13:06 AM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

2 Replies
1089 Views

Similar Articles

[PageSpeed] 45

The 'driver' parameter must match the name of the installed driver, not the
actual dll name.  The ODBC driver manager uses the installed driver name to
look up the name of the dll it needs to use.
Setting driver to 'Adaptive Server Anywhere 8.0' should fix your problem.

-- 
Jason Hinsperger
International and Sustaining Engineering
iAnywhere Solutions

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer
--


"Don Stallone" <NOSPAMstallone_don@TAKEOUThotmail.com> wrote in message
news:3f55beb2$1@forums-1-dub...
> Folks,
>
> Could you please help me with the following code? When the program gets to
> the line that says:
>
>       .Open userid:="myID", Password:="myPassword"
>
> I get an error message saying "[Microsoft][ODBC Driver Manager] Data
source
> name not found and no default driver specified". What I can't figure out
is
> I'm not using a data source name and what do I need a default driver for?
> I've already specified the driver and it's right where I said it was -- 
> i.e., c:\dbodbc8.dll.
>
> I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references are
>
> * Microsoft ActiveX Data Objects 2.5 Library (c:\Program Files\Common
> Files\Sysytem\ADO\msado15.dll)
>
> * Microsoft Data Binding Collection VB 6.0 (SP4)
> (c:\WINNT\System32\MSBND.DLL)
>
> I created a DSN -- that worked -- and then looked at the registry to
examine
> the values I specified in order to transfer them to the connection string.
> Curiously the entry for (Default) was (value not set).
>
> Any help would be greatly appreciated.
>
> TIA
> Don
>
> ==================
> Option Explicit
>
> Private mcnADODB                As ADODB.Connection
>
> Public Function MakeADOConnection( ) As ADODB.Connection
>
> 'Do stuff
>
>     Set mcnADODB = New ADODB.Connection
>     With mcnADODB
>       .CursorLocation = adUseClient
>       .ConnectionString = "AutoStop=yes;" & _
>           "commlinks=sharedmemory;" & _
>           "databasefile=c:\ooo.db;" & _
>           "databasename=oes;driver=c:\dbodbc8.dll;" & _
>           "integrated=no;start=dbeng8"
>       .Mode = adModeRead
>       .Open userid:="myID", Password:="myPassword"
>     End With
>     mblnConnected = True
>
> 'Do more stuff
>
> End Function
>
>


0
Jason
9/3/2003 2:13:04 PM
Hallelujah !!!

You're a god among developers !!!!  You wouldn't believe how long I've been
looking under every rock, bush, cabbage patch doll, refrigerator and bath
tub -- not to mention list serves -- for an answer to this.

Thank you,
Don

"Jason Hinsperger" <NOJason_HinspergerSPAM@hotmail.com> wrote in message
news:3f55f6f0$1@forums-1-dub...
> The 'driver' parameter must match the name of the installed driver, not
the
> actual dll name.  The ODBC driver manager uses the installed driver name
to
> look up the name of the dll it needs to use.
> Setting driver to 'Adaptive Server Anywhere 8.0' should fix your problem.
>
> -- 
> Jason Hinsperger
> International and Sustaining Engineering
> iAnywhere Solutions
>
> Whitepapers, TechDocs, and bug fixes are all available through the
iAnywhere
> Developer Community at www.ianywhere.com/developer
> --
>
>
> "Don Stallone" <NOSPAMstallone_don@TAKEOUThotmail.com> wrote in message
> news:3f55beb2$1@forums-1-dub...
> > Folks,
> >
> > Could you please help me with the following code? When the program gets
to
> > the line that says:
> >
> >       .Open userid:="myID", Password:="myPassword"
> >
> > I get an error message saying "[Microsoft][ODBC Driver Manager] Data
> source
> > name not found and no default driver specified". What I can't figure out
> is
> > I'm not using a data source name and what do I need a default driver
for?
> > I've already specified the driver and it's right where I said it was -- 
> > i.e., c:\dbodbc8.dll.
> >
> > I'm running on an NT 4.0 (SP4) platform using VB6 (SP5). My references
are
> >
> > * Microsoft ActiveX Data Objects 2.5 Library (c:\Program Files\Common
> > Files\Sysytem\ADO\msado15.dll)
> >
> > * Microsoft Data Binding Collection VB 6.0 (SP4)
> > (c:\WINNT\System32\MSBND.DLL)
> >
> > I created a DSN -- that worked -- and then looked at the registry to
> examine
> > the values I specified in order to transfer them to the connection
string.
> > Curiously the entry for (Default) was (value not set).
> >
> > Any help would be greatly appreciated.
> >
> > TIA
> > Don
> >
> > ==================
> > Option Explicit
> >
> > Private mcnADODB                As ADODB.Connection
> >
> > Public Function MakeADOConnection( ) As ADODB.Connection
> >
> > 'Do stuff
> >
> >     Set mcnADODB = New ADODB.Connection
> >     With mcnADODB
> >       .CursorLocation = adUseClient
> >       .ConnectionString = "AutoStop=yes;" & _
> >           "commlinks=sharedmemory;" & _
> >           "databasefile=c:\ooo.db;" & _
> >           "databasename=oes;driver=c:\dbodbc8.dll;" & _
> >           "integrated=no;start=dbeng8"
> >       .Mode = adModeRead
> >       .Open userid:="myID", Password:="myPassword"
> >     End With
> >     mblnConnected = True
> >
> > 'Do more stuff
> >
> > End Function
> >
> >
>
>


0
Don
9/3/2003 3:27:08 PM
Reply:

Similar Artilces:

Connect w/i PB then connect w/i application
PB 5.0.02 Oracle 7.3 Windows 95 I can connect to my database in the development environment of PowerBuilder using a Database Profile. I can go into the database painter and view my tables, etc. If I then attempt to run my application, which contains a script to connect to the same database, the application hangs and I must ALT-CTRL-DEL and End Task. If I run my application from within PowerBuilder without previously connecting to the database, the application runs without a problem. I did a trace and the application is hanging on the LOGIN: command. Any ideas??? Does ...

not connected when I am connected
What do I need to change on my 'puter when the icon in the toolbar shows and tells me I am connected and the error message tells me I am not and I can not go to web pages, get or send emails. I have to close down and restart to get connected again. This only happens if I am on line and leave the 'puter for an hour or so. As long as I am using it I don't have a problem. This just started about a month ago. I am on very slow dialup, DSL and Cable not in my area, thanks you SBC/ATT tks Elaine wrote: > What do I need to change on my 'puter when the icon in ...

ADO Connection with VB6 works, XE2 does not work
I am facing a strange problem in a concrete Windows 7 64 bits Home Premium SP2 machine, with other machines in the same local network all is working ok. My tests are the following: 1.) I create an *.UDL file. I click in "Test connection" and it works, I am using the generated string to test the connection in the programs: Provider=SQLOLEDB.1;Persist Security Info=True;User ID=sa;Password=mypassword;Data Source=SERVIDOR\HOMEDES; 2.) Using an old VB6 program to connect to the SQL Server it works. 3.) Using a test program using XE2 it does not work, it fails in the lin...

Local connection works but not External connection
I have seen some of the threads talk about portal alias.I am very new to DotNetNuke.  I installed it on a little web server.  I can connect to Localhost/Myweb.  Then I added the machine name/web to the portal alias.  Therefore I can connect (on my lan) to MachineName/Myweb without any problem.I forwared port 81 to port 80 to the WebServer (in my linksys router).Now I am trying to connect to my website through the internet.Therefore I do:http://MyIp:81/MywebNothing happens.In IE I disabled Friendly Error Messages and I still can read at the bottom that IE is trying to reso...

The connection is already open and the connection state is connecting.
Hello, I am getting this error time to time randomly. My web application is built on asp.net 3.5 which uses ODBC 5.1 driver to connect to mysql database. I have a separate database class which handles the connection, execute, fetching and all. The application runs fine for sometime then suddenly the users start getting this error after which the application fails to insert select from database. I have posted in this forum couple of times now and no one is really contributing or helping me. Please..Any help will be highly appreciated.. Many thanks, Viv The database abstract loo...

SFtp connect
The following Ftp connect to a sftp site has the right port/usrname/password [verified thru filezilla], but when I try to connect via TIDFTP -- I get "Connection Closed Gracefully" upon ftp->Connect();; The ftp properties are below the code. I have no other Indy objects on the form. It ocurred to me that I may need something for sftp. ftp->Connect(); if (ftp->Connected()) { ::Sleep(1); } object ftp: TIdFTP AutoLogin = True Host = 'ftp.dailyaccess.com' Password ='XXXXX' Port = 21 Username = 'charles.leggette' ProxySet...

Recycling connections in a ADO.Net connection pool
I have a requirement where I will need to get a handle on the existing connections in a particular ADO.Net connection pool (identified by the unique connection string) and close and open them one by one. This is because whenever we compile a package or stored procedure, ADO.Net does not realise this and keeps giving "Package is invalid" error. I am using ODP.Net Client 9.2.0.4. The current solution is to restart the application pool to flush the connection pool. Does anyone know how to get a list of all connection objects in the ADO.Net connection pool given a connection stri...

Remote connections work, Local connections don't !!!! This failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
This is really weird.  I am develping a web site on my local box pointing to a remote database.  It all works fine. Then, I migrate the site to that remote server (running IIS and SQL Server 2005), so that the site and the DB are now on the same server.. the SAME server on which the database resides to which I can connect from my local dev box.... and the connection does not work!!!!   This is the connection string I am using:<add name="MyConnectionString" connectionString="Data Source=xxx.xxx.xx.xx;Initial Catalog=DatabaseName;User Id=xxxx;Password=xxxx...

ODBC Connection parameter for ASA database for FireDac Connectivity
Hi , we are migrating our Delphi application from BDE to FireDac and during the database connectivity in BDE we have used below ODBC connection code parameter: ====================================== Connection definition parameters for BDE ===================================== DATABASE NAME = Globalware.db ODBC DSN= Globalware32 OPEN MODE=READ/WRITE BATCH COUNT=200 MAX ROWS=-1 SCHEMA CACHE SIZE=8 SCHEMA CACHE TIME=-1 SQLPASSTHRU MODE=SHARED AUTOCOMMIT ENABLE SCHEMA CACHE=FALSE ENABLE BCD=FALSE ...

MSDE Connection occasionally does not work until connection with Administrator account.
We recently migrated our website from Windows 2000 Server to Windows 2003 Standard Server. We had absolutely no problems with the Website until the migration to 2003. The website was developed with Visual Studio 2003, and we used MSDE SP3a to host the database. The database is configured for integrated domain authentication and consists of only 5 tables. Users are explicitly granted only the required access permission's to each table. The problem is that occasionally ( 3 to 4 times per day ) users are unable to connect to the certain tables in the database from the website. They recei...

OpenVPN no connectivity after connecting
My goal with the OpenSuSE machine I have set up is to be an OpenVPN server. So far so good, I have started the server and I am able to connect a Mac client (running TunnelBlick) to the server. However the client doesn't have any connectivity, I can't ping any addresses for example. The server is set up for bridging instead of routing as I want the remote client to get an IP address in the same range as the rest of the LAN. The client is getting an IP address from the range specified in my server.conf file, so that's a start, but the client can't talk to anyone. ...

@@connections and user connections
Hi! I've a doubt, I hope you can help me. I've ASE 11.9.3 on HP-UX 11.0. The problem is at times, when an user run an aplication, soon afterwards system log out him. I checked the log and I found the next error: 01:00000:00008:2000/06/28 11:15:27.32 server Error: 1601, Severity: 21, State: 3 01:00000:00008:2000/06/28 11:15:27.33 server There are not enough 'user connections' available to start a new process. Retry when there are fewer active users, or ask your System Administrator to reconfigure SQL Server with more user connections. But, the point is I...

Number of connections connected
hi, all I can limit the user connections to my sybase. But how can I know how many connections currently connected to my sybase ? Regards, Keene Hui Kenneth Hui wrote: > I can limit the user connections to my sybase. Do you mean on a per user basis? If so, no. > But how can I know how many connections currently connected > to my sybase ? 'sp_who' or 'select * from sysprocesses' will show the current connections. -am � 2001 ...

Web resources about - ADO Connection Does Not Work W/ Same Parameters As DSN Connection - sybase.sqlanywhere.general

Connection - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iMedia Connection: Interactive Marketing News, Features, Podcasts and Video - iMediaConnection.com
High-quality data, if not used properly, can still lead marketers to make bad decisions. Consider these common ways that numbers are used to ...

HTTP persistent connection - Wikipedia, the free encyclopedia
... tacked on to an existing protocol. If the browser supports keep-alive, it adds an additional header to the request: Following this, the connection ...

CareerSonar Turns Facebook Friends Into Job Connections
Looking for a job ? Among your Facebook friends lies the potential for employment. CareerSonar , a new service, brings together a person’s connections ...

Half of data connections by top 500 Android apps are 'covert' with no effect on user experience
Researchers at the Massachusetts Institute of Technology have discovered that half of the communications connections established by the top free ...

The Direct Connection
... And the people reading my words respond back to me with words of their own. The technology that allows this is powerful but this direct connection ...

Don’t Let Great Content Fall on Deaf Ears: Know your Connection Strategy
... via employee newsletter when it should have come through small-group manager meetings All of these and more are the result of a faulty connection ...

Be Goofy, Smile At Your Baby: Protection Begins with Connection, Pediatrician Says
VideoPart 3 of a series Andrew Garner wears silly ties and finds it easy to make a goofy face. These are valuable tools for charming the babies ...

Mali arrests 2 in connection with deadly hotel attack
Mali arrests 2 in connection with deadly hotel attack

Get ready for live-streamed extreme sports: Seattle startup Sioeye adds 4G connection to action cam
The history of people doing crazy stunts on camera is full of notable achievements. Motorcycle daredevil Evel Knievel jumped over whatever he ...

Resources last updated: 11/27/2015 7:17:07 PM