SunQuest
           Database Management
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDatabase Management

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old January 15th, 2003, 10:40 PM
sparkrulez sparkrulez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Canada
Posts: 19 sparkrulez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question mysql vb6

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..

Reply With Quote
  #2  
Old January 16th, 2003, 09:33 AM
rap rap is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: -
Posts: 13 rap User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to rap Send a message via Yahoo to rap
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

Reply With Quote
  #3  
Old January 16th, 2003, 01:00 PM
sparkrulez sparkrulez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Canada
Posts: 19 sparkrulez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #4  
Old January 16th, 2003, 02:27 PM
victorpendleton victorpendleton is offline
Contributing User
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Jan 2003
Location: No es importante
Posts: 2,065 victorpendleton User rank is Private First Class (20 - 50 Reputation Level)victorpendleton User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 6 h 31 m 56 sec
Reputation Power: 8
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

Reply With Quote
  #5  
Old January 16th, 2003, 06:25 PM
sparkrulez sparkrulez is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Location: Canada
Posts: 19 sparkrulez User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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...

Reply With Quote
  #6  
Old January 16th, 2003, 10:18 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,173 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 24
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

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDatabase Management > mysql vb6


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway