List:MySQL ODBC« Previous MessageNext Message »
From:Peter Carter Date:November 22 1999 9:30pm
Subject:RE: MyODBC & VB
View as plain text  
Well, you might want to check out what I have done. My site is and it is a web based VB (script and class) designer.
I have emulated server-side cursors in the approach and have implemented
the databases as objects (ie: field name becomes a variable within the
class). You can use the code 'asis' or use it as a model to get around your

I created it for me, to serve my purposes but allow anyone to use it to the
same end.

PS: the vb script does the same, but I am a little late to get the docs
out.... ;)

At 03:33 PM 11/22/99 +0100, you wrote:
>MyODBC (the Mysql ODBC drivers dosn't support this sort of cursor... You
>could only browse data but not Modify or add data.
>You must use a true SQL, like rsmysql.execute "INSERT INTO...."
>-----Original Message-----
>From: Varun Varma [mailto:varun@stripped]
>Sent: samedi 20 novembre 1999 17:00
>To: myodbc@stripped
>Subject: MyODBC & VB
>Hello All,
>I am using ADO in VB6 to connect to a remote MySQL server running on a
>Unix box (BSDI, if you must know).
>Now the connection works fine, except that that no default database is
>being selected, even though I have specified it in the ConnectionString
>(in DB=...).
>Here's the code that I am actually using :
> cnnMySQL.ConnectionString = "Driver=MySQL;" & _
> "Server=" & txtServer.Text & "; DB=propertywala;" & _
> "UID=" + txtUserName.Text + "; Password=" + txtPassword.Text & ";"
>Right now, I am issuing a "USE propertywala" command after connection
>and that works fine, but I was just wondering why "propertywala" is not
>being selected as the default database. BTW, if I give "PWD" instead of
>"Password", it returns an authentication faliure - "Using Password - No"
>etc. Is that what is supposed to happen - shouldn't it except (in fact,
>enforce) using "PWD" instead of "Password"?
>Another question is that can I open a ADO recordset pointing to a table
>on the MySQL server and use the standard features of the ADO spec. What
>I really want to do is replicate data from a local MDB file to a
>database on the server. The table definitions are the same, except the
>tables on the server have one additional field - TimeStamp.
>Here's the code:
>  'Open recordset for empty table on server. Variable TableName contains
>  'the name of the table
>   rsMySQL.Open TableName, cnnMySQL, , , adCmdTable
>  'Done. Now open same recordset on the local machine
>   rsMDB.Open TableName, cnnMDB
>   FieldCount = rsMDB.Fields.Count - 1
>   Do Until rsMDB.EOF
>    For m = 1 To FieldCount
>     rsMySQL.AddNew
>     Set rsMySQL.Fields(m).Value = rsMDB.Fields(m).Value
>     rsMySQL.Update
>    Next
>   Loop
>   rsMDB.Close
>   rsMySQL.Close
>The app. crashes on the rsMySQL.AddNew statement saying that the
>provider does not support this feature. The connections have been
>already intialized.
>Does anyone have simple solution to my problem - i.e. replicating data
>in similar tables, without having to write out the SQL statements.
>And now [drum roll] finally - my last question!
>If I wish to bundle the MyODBC driver (myodbc.dll) with a program, then
>what do I have to do to install this on the client machine (assuming the
>ODBC is already installed).
>I am presumming that I can get away with just adding the following
>registry entries under
>APILevel "2"
>ConnectionFunctions "YYN"
>Driver "C:\Windows\System\myodbc.dll"
>DriverODBCVer "0.250"
>FileExtns "*.txt"
>FileUsage "1"
>SQLLevel "1"
>(Note: I have skipped the "Setup" entry, because I will be distributing
>only myodbc2.dll)
>Is there anything else that I should do to successfully register the
>MyODBC driver?
>Thanks in advance...
>|                         |
>|      Varun Varma        |
>|  Web Yarn Technologies  |
>|  |
>| A-50, Sector-39, NOIDA, |
>|  U.P., India - 201301   |
>|  Ph.: 91-011-8575991,   |
>|              8576970,   |
>|   Mobile: 9810154085    |
>Please check "" before
>posting. To request this thread, e-mail myodbc-thread907@stripped
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail myodbc-unsubscribe@stripped instead.
>Please check "" before
>posting. To request this thread, e-mail myodbc-thread910@stripped
>To unsubscribe, send a message to the address shown in the
>List-Unsubscribe header of this message. If you cannot see it,
>e-mail myodbc-unsubscribe@stripped instead.
Peter B. Carter (peterc@stripped)
Pager: 613-751-4660

MyODBC & VBVarun Varma20 Nov
RE: MyODBC & VBGilles Cordier22 Nov
  • RE: MyODBC & VBPeter Carter23 Nov