|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Does anyone know where I can find an online primer on vb6 and mysql. I am a rookie with vb(so I don't know that much vb), I am more or less a php programmer.
I am working with a call display application that log's all the incoming calls. All I need to do is connect to my database and then record the calls. This is very easily achieved with PHP... So far I have installed MyODBC 2.50 but I don't know how to test to see if it works in vb6... any help or guidance would be greatly appreciated.. thanks in advance.. |
|
#2
|
|||
|
|||
|
Hi,
Basically you need to create a DSN on your computer, than to create an ADODB Connection object and to connect using your DSN. Having your connection it has a method to execute a sql string. I hope this helps. Best regards Razvan |
|
#3
|
|||
|
|||
|
I have set up a dsn...but I am still unable to set up a connection...
dsn ='mysql_dsn' server ='localhost' password ='' user ='' Could you help me with the next step... I am a rookie..I know once I setup a connection...I will be able to build my code from there..it's getting the initial connection that's killing me. thanks in advance |
|
#4
|
|||
|
|||
|
Dim myRS As New ADODB.Recordset
Set myRS = New ADODB.Recordset myRS.ActiveConnection = "Driver={MySQL}; server=; DB=; UID=; PWD=" myRS.Open ... ... myRS.close Set myRS = Nothing |
|
#5
|
|||
|
|||
|
this worked for me
Dim conn As New ADODB.Connection
conn.ConnectionString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=localhost;DATABASE=mydatabase;UID=myid;PWD=mypassword;" The above code worked for ME! Damn, there is nothing worse than the first steps of learning something new....makes you feel real stupid... YIPPE... |
|
#6
|
||||
|
||||
|
One more small thing. The MySQL ODBC driver has a setting to "Don't Optimize Column Width". If you decide to use disconnected, client-side recordsets, not having this option set can cause problems. To set this programatically, you have to set Option = 1. Here's a couple of links to some other posts. It never hurts to have this option set, but trying to figure out why your program won't work when it isn't can be frustrating:
http://forums.devshed.com/showthrea...15952&forumid=4 http://forums.devshed.com/showthrea...27196&forumid=4 |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > mysql vb6 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|