C# and MySQL using ByteFX Data Provider

M

myUsername?

hi all,

I want to get an db connection to a mysql database, using the bytefx
data provider. I want to use this provider because i have to migrate
my webservice to Linux/Mono and as I know, the mono mySQL data
provider is based on the bytefx data provider.

My problem:
i can't find the provider under
-Server Explorer
-Add Connection
-Data Link Properties
-Provider
on visual studio .net 2003

has anyone an idea how to get a connection, using bytefx?
Do i have to make the whole connection from scratch?

I am used to drag and drop a new connection using the server explorer
of the .net studio because i am not that experienced with c#
programming (or programming in general).

Thanks for your help
regards Thomas
 
G

Guest

I am not familiar with teh provider you mention, but it probably has a help
file that shows a connection string. Drill down in the thread "Multiple Table
DataSet" for a code snippet (both C# and VB.NET) for connecting to a
database. Change the Sql____ objects to OleDb____ and use the connection
string provided by the provider you are using. In addition, comment out the
line that sets command type to stored procedure as you are likely using ad
hoc queries rather than procs.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 
R

Richard

myUsername? said:
hi all,

I want to get an db connection to a mysql database, using the bytefx
data provider. I want to use this provider because i have to migrate
my webservice to Linux/Mono and as I know, the mono mySQL data
provider is based on the bytefx data provider.

My problem:
i can't find the provider under
-Server Explorer
-Add Connection
-Data Link Properties
-Provider
on visual studio .net 2003

has anyone an idea how to get a connection, using bytefx?
Do i have to make the whole connection from scratch?

I am used to drag and drop a new connection using the server explorer
of the .net studio because i am not that experienced with c#
programming (or programming in general).

Firstly, don't use the ByteFX provider - it's been incorporated into
the MySQL connectors. See http://www.mysql.com/products/connector/

There you will find two connectors - one being an ODBC provider that
you should be able to use in Server explorer, etc. This is OK, but not
the preferred one.

The other is the .NET connector (formerly ByteFX). The namespace will
be MySQL.Data.

For your code to connect to the database try something like

(vb.net code shown here)
dim connection as New MySqlConnection
connection.ConnectionString = "Server=" & m_serverName & ";" &
"Database=" & m_name & ";" & "User ID=" & m_user & ";" & "Password=" &
m_password
connection.Open()

- Richard.

http://jcframework.sourceforge.net
Open Source Object Relational Mapping
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top