473,799 Members | 3,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection string

I am using the following code in Access 2k to establich a connection to a
MYSQL database

Dim conn As ADODB.Connectio n

Set conn = New ADODB.Connectio n

conn.Connection String = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
myUsername_
& ";DATABASE= " & mySQLDatabase_
& ";SERVER=" & myServer_
& ";PASSWORD= " & myPassword_
& ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
conn.Open

I get a Catostrophic failure error on the conn.Open line

This seems to work on one of my computers but not on the other. Both Windows
2K
Can anyone please help.
Alex
Jul 23 '05 #1
2 2425
On Tue, 25 Jan 2005 22:30:12 GMT, "Paradigm" <al********@hot mail.com> wrote in 23 Lines :
I am using the following code in Access 2k to establich a connection to a
MYSQL database

Dim conn As ADODB.Connectio n

Set conn = New ADODB.Connectio n

conn.Connectio nString = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
myUsername_
& ";DATABASE= " & mySQLDatabase_
& ";SERVER=" & myServer_
& ";PASSWORD= " & myPassword_
& ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
conn.Open

I get a Catostrophic failure error on the conn.Open line

This seems to work on one of my computers but not on the other. Both Windows
2K
Can anyone please help.
Alex


The best way is to check in your Visual basic screen if on both computer the reference object are the same.
Can be that on one computer the reference to ' Microsoft ActiveX Data Object 2.1 library ' is not there.


Jul 23 '05 #2
ActiveX data objects is in the references.
I have checked the computers and they have the same list of references.
Alex

"Pieter" <P.***@wsx.nl > wrote in message
news:4m******** *************** *********@4ax.c om...
On Tue, 25 Jan 2005 22:30:12 GMT, "Paradigm" <al********@hot mail.com> wrote in 23 Lines :
I am using the following code in Access 2k to establich a connection to a
MYSQL database

Dim conn As ADODB.Connectio n

Set conn = New ADODB.Connectio n

conn.Connectio nString = "DRIVER={My SQL ODBC 3.51 Driver};DESC=;U SER=" &
myUsername_
& ";DATABASE= " & mySQLDatabase_
& ";SERVER=" & myServer_
& ";PASSWORD= " & myPassword_
& ";PORT=;OPTION= ;STMT=;" ';TABLE=" & myTable
conn.Open

I get a Catostrophic failure error on the conn.Open line

This seems to work on one of my computers but not on the other. Both Windows2K
Can anyone please help.
Alex

The best way is to check in your Visual basic screen if on both computer

the reference object are the same. Can be that on one computer the reference to ' Microsoft ActiveX Data Object 2.1 library ' is not there.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
3254
by: AMC | last post by:
Hi, I'm using an include file to store the connection string to a database. Whenever I try to reference that string to open a connection in the page that includes the file I get the error 'empy connection string' . When I write the string to the page using response.write(connectionstring) it shows up fine. Is the something else that I need to do? Thanks
0
2631
by: Jay Douglas | last post by:
Hello, I'm trying to create a Data Links Property window that behaves just like the dialog box in Visual Studio .Net for MS Sql Server connections. I've found a lot of examples that use DataLinks classes from "Microsoft OLE DB Service Component 1.0 Type Library" and the Connection object from ADODB. However, when setting the connection string using these classes the connection string always returns a really basic connection string with...
5
2133
by: Matt | last post by:
Hello, What is the best way to handle the database connection string for a class library project that will be compiled and used as a .dll? This .dll will be accessed via classic ASP and in the future by ASP.NET pages. I have created a constant that contains the connection string (as shown below).
37
8971
by: sam44 | last post by:
Hi, At startup the user log on and chooses the name of a client from a dropdownlist, which then changes dynamically the connection string (the name of the client indicates which database to use). I then change dynamically the connection string by doing : My.Settings.Item("ConnectionString") = "some connection sring" The problem is that if another user loggs in and chooses another client, then obviously it changes the connection string...
1
6069
by: Sankalp | last post by:
Hi, I am using VB 2005. My application has many data bound controls. The connection is stored in the app.config file. I want the application to start with a default connection string and while during the runtime, the user can click on a button and change the connection string without exiting the application. I would really appreciate any sort of help.
3
4894
by: fniles | last post by:
In the Windows application (using VB.NET 2005) I use connection pooling like the following: In the main form load I open a connection using a connection string that I stored in a global variable g_sConnectionString and leave this connection open and not close it until it exits the application. Then on each thread/each subsequent sub that needs the connection I create a local OleDBConnection variable, open the connection using the exact...
6
8165
Cintury
by: Cintury | last post by:
Hi all, I've developed a mobile application for windows mobile 5.0 that has been in use for a while (1 year and a couple of months). It was developed in visual studios 2005 with a back-end sql server mobile ce database. Until recently I was synching everything thru a com port serial cable. The devices would connect to the computer thru activesync and are able to acquire an internet connection. The sync for the program occurs thru a website...
0
1983
by: Robert Avery | last post by:
In VBA/VB6, I had a class (incomplete sample below) that watched and displayed for the user all connection events, so that I could easily see what SQL was taking a long time, and when it freezes, I could see what is the SQL that freezes the program. I wanted to replicate this for VB.NET, but the SqlConnection object does not seem to support nearly as rich a set of events as the ADODB.Connection object. Any ideas where these events went,...
2
5397
by: Johnson | last post by:
I'm trying to fix a "sub optimal" situation with respect to connection string management. Your thoughtful responses will be appreciated. I just started with a new client who has a bunch of legacy ASP.NET applications that all manage connection strings in Web.config the same way, like this: This client has one Web.config file per application, and that one Web.config file is duplicated across all environments (i.e., dev machines, test,...
0
10482
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10251
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10027
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9072
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6805
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5463
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4139
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3759
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.