Bonjour,
J'aimerais transferer une table d'une bdd sqlserver vers mysql en utilisant les drivers ODBC. Les deux tables on la meme definition et j'utilise GetRows pour recuperer les donnees de la premiere base de donnee.
Cela me retourne un objet a 2 dimentions que je ne sais pas comment parser
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8 Dim Rs As New ADODB.Recordset Dim SQLConnection As New ADODB.Connection SQLConnection.Open("connectionstring") SQLConnection.CommandTimeout = 0 Rs.Open("DimAccount", SQLConnection, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockReadOnly) Dim datatable As New Object datatable = Rs.GetRows()
Comment faire pour l'inserer dans ma table mysql?
Merci pour votre aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6 Dim Rs2 As New ADODB.Recordset Dim SQLConnection2 As New ADODB.Connection SQLConnection2.Open("Dsn=mysql;") SQLConnection2.CommandTimeout = 0 Rs2.Open("DimAccount", SQLConnection2, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockBatchOptimistic)
Partager