[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

Mysql connection and usage question

Mathieu Dumoulin

7/31/2002 5:57:00 PM

Ok, i've been looking all over the web for a way to connect through MySQL
server so i create an offline application using my data from my Web
Application based on MYSQL.

I've looked at a lot of things this is my final try.

I installed MDAC 7.0, The patch for ODBC.Net, and looked all over the place
to find my odbc namespace or anything that looks like it. i can't find it...

Can anyone refer me to a place where i can find exact step by step info on
how to connect to a ODBC DSN or simply an ODBC using a connection string
will be ok.

Or, you can email me the information

Thankss
InsaneCoder


3 Answers

NETMaster

7/31/2002 7:52:00 PM

0

also try third-party [at your own risk]

MySQL provider ($ / free 'Personal Edition')
http://www.einfodesigns.com/pro...



--
NETMaster (Thomas Scheidegger)
http://www.cetus-links.org/oo_c...


"Mathieu Dumoulin" <mdumoulin@groupimage.com> wrote in message news:euHCbrKOCHA.1796@tkmsftngp09...
> Ok, i've been looking all over the web for a way to connect through MySQL
> server so i create an offline application using my data from my Web
> Application based on MYSQL.



Jan D'Hondt

8/3/2002 1:34:00 PM

0

Mathieu

I have just made it work for Postgresql, I presume it will be similar

I have made an odbc dsn Pgdsn
In visual studio dotnet project add a reference to microsoft.data.odbc.dll

In your code :

Imports Microsoft.Data.Odbc
...
Dim oconn As New
OdbcConnection("ODBC;DSN=Pgdsn;Driver={PostgreSQL};DATABASE=Mydb;SERVER=myse
rver;PORT=5432;UID=myname;")

DSN= is the name of the dsn I have made
Driver={ you can find the driver name in the list of drivers in the odbc
setup dialog window}
SERVER= can be an ip address or a server name depending on your setup
PORT=5432 is the std postgres port on the linux server

Hope this helps


"Mathieu Dumoulin" <mdumoulin@groupimage.com> schreef in bericht
news:euHCbrKOCHA.1796@tkmsftngp09...
> Ok, i've been looking all over the web for a way to connect through MySQL
> server so i create an offline application using my data from my Web
> Application based on MYSQL.
>
> I've looked at a lot of things this is my final try.
>
> I installed MDAC 7.0, The patch for ODBC.Net, and looked all over the
place
> to find my odbc namespace or anything that looks like it. i can't find
it...
>
> Can anyone refer me to a place where i can find exact step by step info on
> how to connect to a ODBC DSN or simply an ODBC using a connection string
> will be ok.
>
> Or, you can email me the information
>
> Thankss
> InsaneCoder
>
>


TPSoftware

8/3/2002 6:52:00 PM

0

Hey I had the same problem a few days ago:

http://www.einfodesigns.com/pro...

Download a free version of the Managed mySQL provider for .NET
It's really easy and fully managed.

This also means you can keep the drag & drop deployment
since the user doesn't need any special ODBC drivers,
while connecting trough ODBC.net would still require another driver such as
myODBC.

Example code:

Dim objConn As MySqlConnection

objConn = New MySqlConnection("Data
Source=213.235.123.26;Database=mydatabase;User
ID=tim;Password=blablabla;COMMAND LOGGIN=false")

objConn.Open()

Dim objCMD As MySqlCommand = New MySqlCommand("SELECT * FROM core", objConn)

Dim objDR As MySqlDataReader = objCMD.ExecuteReader

Do While objDR.Read

Debug.Writeline(objDR("name").ToString)

Loop

Hope this helps
TP.


----- Original Message -----
From: "Mathieu Dumoulin" <mdumoulin@groupimage.com>
Newsgroups: microsoft.public.dotnet.framework.odbcnet
Sent: Wednesday, July 31, 2002 5:57 PM
Subject: Mysql connection and usage question


> Ok, i've been looking all over the web for a way to connect through MySQL
> server so i create an offline application using my data from my Web
> Application based on MYSQL.
>
> I've looked at a lot of things this is my final try.
>
> I installed MDAC 7.0, The patch for ODBC.Net, and looked all over the
place
> to find my odbc namespace or anything that looks like it. i can't find
it...
>
> Can anyone refer me to a place where i can find exact step by step info on
> how to connect to a ODBC DSN or simply an ODBC using a connection string
> will be ok.
>
> Or, you can email me the information
>
> Thankss
> InsaneCoder
>
>



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.g...).
Version: 6.0.381 / Virus Database: 214 - Release Date: 2/08/2002