473,800 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem connection to MySQL using .net

Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstrin g from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionStrin g. An
example would be, 'Provider=SQLOL EDB;'."

What i try is:

Return New OleDb.OleDbComm and("DRIVER={My SQL ODBC 3.51
Driver};SERVER= localhost;DATAB ASE=bigshop;UID =root;PASSWORD= ;OPTION=3;")

- Should I use an other connectionstrin g?
Jul 19 '05 #1
2 5539
heya -
oledb is not odbc - suggest you shift to using odbc directly [if you can] or
layer your odbc driver to be properly 'called' from the oledb interface.

hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex****** **@efgroup.net
mySql / VFP / MS-SQL
"Soren Bendtsen" <sb****@worldon line.dk> wrote in message
news:29******** *************** ***@posting.goo gle.com...
Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstrin g from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionStrin g. An
example would be, 'Provider=SQLOL EDB;'."

What i try is:

Return New OleDb.OleDbComm and("DRIVER={My SQL ODBC 3.51
Driver};SERVER= localhost;DATAB ASE=bigshop;UID =root;PASSWORD= ;OPTION=3;")

- Should I use an other connectionstrin g?

Jul 19 '05 #2
heya -
oledb is not odbc - suggest you shift to using odbc directly [if you can] or
layer your odbc driver to be properly 'called' from the oledb interface.

hth - mondo regards [Bill]
--
William Sanders / Electronic Filing Group Remove the DOT BOB to reply via
email.
FREE LONG DISTANCE -> mailto:ex****** **@efgroup.net
mySql / VFP / MS-SQL
"Soren Bendtsen" <sb****@worldon line.dk> wrote in message
news:29******** *************** ***@posting.goo gle.com...
Hi,

I am trying to connect to a MySQL database, using the .Net framework.

I installed the newest MyODCB (3.51) and the .Net ODBC drivers from
Microsoft.

I made a System DSN using the driver, and i get it to connect - so far
so good.

But if i try making a new connection i my code using the sample
connectionstrin g from MySQL, i get an Exception :(

"An OLE DB Provider was not specified in the ConnectionStrin g. An
example would be, 'Provider=SQLOL EDB;'."

What i try is:

Return New OleDb.OleDbComm and("DRIVER={My SQL ODBC 3.51
Driver};SERVER= localhost;DATAB ASE=bigshop;UID =root;PASSWORD= ;OPTION=3;")

- Should I use an other connectionstrin g?

Jul 19 '05 #3

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

Similar topics

0
2569
by: sridhar nagabhurshana | last post by:
hello I am trying to connect to mysql database using connector/J jdbc driver this is my code import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException;
1
3077
by: Chinmay Shah | last post by:
hi, when i try to call the mysql_init function it is not getting initilized properly. can someone help me thanks chinmay
6
676
by: Ian Davies | last post by:
Hello I have the following code to connect to mySQL database from VB6 ******************************************** Private Sub Form_Load() Dim conn As ADODB.Connection Set conn = New ADODB.Connection conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};" _
4
8422
by: Ian Davies | last post by:
Hello all The following code allows me to connect to a local MySQL database on my pc from a VB6 project. **************************************************************************** ** Dim conn As ADODB.Connection Dim cs As String Dim MyServer As String
1
2779
by: James | last post by:
Hey everyone, I have a really obscure but impassable problem with a reasonably simple piece of php/PEAR DB/MySQL code When calling several stored procs the first call succeeds, but subsequent calls fail no matter which SP is called first it always works, and the rest fail... with: >>>
0
1643
by: Daniel Crespo | last post by:
Hi to all, I'm using adodb for accessing mysql and postgres. My problem relies on the mysql access. Sometimes, when I try to execute a query (using ExecTrans method below), I get this error: 'NoneType' object has no attribute 'cursor'
31
4607
by: Extremest | last post by:
I have a loop that is set to run as long as the arraylist is > 0. at the beginning of this loop I grab the first object and then remove it. I then go into another loop that checks to see if there are more objects that match the first object that i grabbed. If they match then I put them in an array. I would like to remove each match from the arraylist as I find them to speed things up and so that they don't get checked again. If I try...
10
1853
by: sssk28 | last post by:
i have installed fedora core 6 and i am getting following error: type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception
2
2623
by: dmstn | last post by:
Hey! I've got a little problem. I have to make a web site for a university essay. I curently have to create a search engine. Users can enter a hotel name in a search bar and results have to appear in another screen. All of this has to be done with java servlets. I think there's something I don't see and it's wrong. My problem is that anything I enter in the search bar appears as a result in the results page, even if there's not such a name in...
1
4351
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning: Found only 0 objects in /root/.cpan/Metadata CPAN: LWP::UserAgent loaded ok
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10495
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
9085
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...
1
7573
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6811
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
5469
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
4148
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
3764
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2942
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.