Hi,
I have installed mySql 3.23 max for NT and i'm getting the following error,
but I am not sure if it is ADO or MySQL at fault !
I need to list the tables,columns and indices of the DB and the last index
access statement is failing. I'm accessing MySql via a DSN connection from
within VB6.
I get access the table list and the table properties but not the index info.
Code attached - Command3_click fails and although it looks like an ADO
error the two other commands work ?
*****
Also I have a question regarding Discussion groups/newsgroups of MySQL
users.
I have written an end-user reporting tool that accesses mainframe/Unix/Vax
based DBs via middle-ware and until NOW (using MySQL) uses either
SQL-Server,Oracle, Sybase as the local repository to hold application info
etc, as the master data would be held in Adabas/DB2/VSAM on the legacy
platform.
If I had access to such a group I could get info to see if any one would be
interested in such a product ?
Even yourselves as a marketing piece on how such an application uses MySQL
as the local repository and allows users more freedom than with the
Microsoft/Oracle route whilst keeping their legacy DBs as the master source.
Interested ?
Thanks
Martin
=================================
Attached Code:
Option Explicit
Dim myconn As New ADODB.Connection
Dim LocalRs As New Recordset
Dim mycomm As New ADODB.Command
Dim gSQLSyntax As String
Dim PtyDDM As String
Dim iIx As Integer
Dim sTable As String
Private Sub Command1_Click()
myconn.Open "DSN=DataObjects-DSN"
gSQLSyntax = "SHOW TABLES"
Set LocalRs.ActiveConnection = myconn
LocalRs.CursorLocation = adUseClient
LocalRs.Open gSQLSyntax, myconn, adOpenForwardOnly, adLockReadOnly
If LocalRs.RecordCount <> 0 Then
sTable = "tables_in_" & "dataobjects"
Do While Not LocalRs.EOF
Debug.Print LocalRs.Fields(sTable).Value
LocalRs.MoveNext
Loop
End If
LocalRs.Close
myconn.Close
End Sub
Private Sub Command2_Click()
myconn.Open "DSN=DataObjects-DSN"
PtyDDM = "DDMAudit"
gSQLSyntax = "DESCRIBE " & PtyDDM
Set LocalRs.ActiveConnection = myconn
LocalRs.CursorLocation = adUseClient
LocalRs.Open gSQLSyntax, myconn, adOpenForwardOnly, adLockReadOnly
If LocalRs.RecordCount <> 0 Then
Do While Not LocalRs.EOF
Debug.Print LocalRs.Fields("field").Value & "," & _
LocalRs.Fields("type").Value
LocalRs.MoveNext
Loop
End If
LocalRs.Close
myconn.Close
End Sub
The following fails on the rs open statement with :
[Microsoft][ODBC Driver Manager] Driver does not support this parameter
myconn has the value
Provider=MSDASQL.1;Extended
Properties="DSN=DataObjects-DSN;DATABASE=DataObjects;SERVER=PC03;UID=root;PWD=Haragei;PORT=3306;OPTION=0;STMT=;"
Private Sub Command3_Click()
myconn.Open "DSN=DataObjects-DSN"
PtyDDM = "DDMProjDetails"
gSQLSyntax = "SHOW INDEX FROM " & PtyDDM
Set LocalRs.ActiveConnection = myconn
LocalRs.CursorLocation = adUseClient
LocalRs.Open gSQLSyntax, myconn, adOpenForwardOnly, adLockReadOnly
If LocalRs.RecordCount <> 0 Then
Do While Not LocalRs.EOF
Debug.Print LocalRs.Fields("column_name").Value
LocalRs.MoveNext
Loop
End If
LocalRs.Close
myconn.Close
End Sub
_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php