Click here to Skip to main content
15,886,919 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: I need help please !!!! Pin
Dave Kreskowiak1-Dec-04 7:24
mveDave Kreskowiak1-Dec-04 7:24 
GeneralRe: I need help please !!!! Pin
Suresh Prasad1-Dec-04 7:36
Suresh Prasad1-Dec-04 7:36 
GeneralRe: I need help please !!!! Pin
Dave Kreskowiak1-Dec-04 11:48
mveDave Kreskowiak1-Dec-04 11:48 
GeneralRe: I need help please !!!! Pin
Suresh Prasad1-Dec-04 12:00
Suresh Prasad1-Dec-04 12:00 
GeneralRe: I need help please !!!! Pin
Dave Kreskowiak2-Dec-04 1:10
mveDave Kreskowiak2-Dec-04 1:10 
GeneralRe: I need help please !!!! Pin
Suresh Prasad2-Dec-04 6:38
Suresh Prasad2-Dec-04 6:38 
GeneralRe: I need help please !!!! Pin
Mekong River2-Dec-04 10:34
Mekong River2-Dec-04 10:34 
GeneralRe: I need help please !!!! Pin
Suresh Prasad3-Dec-04 7:00
Suresh Prasad3-Dec-04 7:00 
Can anyone tell me whats wrong with my code. I am getting a syntax error on the INSERT staement. Also, will this work to import the data into access.

Private Sub ImportToAccess()

Dim Con1 As New ADODB.Connection
Dim Con2 As New ADODB.Connection
Dim mySQL1 As String
Dim mySQL2 As String
Dim myDSN As String
Dim mySET As String

'Connection parameters for Source Database
myDSN = "DSN=Springbrook1;UID=suresh;PWD=****;"
mySET = "set schema 'pub'"
mySQL2 = "select * from customer"

'Open Source Database
Con2.Open myDSN
Con2.Execute (mySET)

'Open Destination Database
Con1.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\Temp\VB Sample Codes\mcwd\Connect Program\test1.mdb;" & _
"Jet OLEDB:Engine Type=5;"

'Read from Source Database
mySQL1 = "SELECT Cust_No, First_Name, Last_Name FROM [odbc;DSN=Springbrook1;UID=suresh;PWD=nissan;].[Customer]"

'Import Data to Destination Database
mySQL2 = "INSERT INTO [C:\Temp\VB Sample Codes\mcwd\Connect Program\test1.mdb].[tblCustomer] "

Con1.Execute mySQL1
Con1.Execute mySQL2

Con1.Close
Con2.Close
Set Con1 = Nothing
Set Con2 = Nothing

End Sub
GeneralRe: I need help please !!!! Pin
Dave Kreskowiak3-Dec-04 5:44
mveDave Kreskowiak3-Dec-04 5:44 
GeneralProblema pri sozdanii controla Pin
RendeRRR1-Dec-04 3:47
RendeRRR1-Dec-04 3:47 
GeneralRe: Problema pri sozdanii controla Pin
Dave Kreskowiak1-Dec-04 4:41
mveDave Kreskowiak1-Dec-04 4:41 
Generalemail Pin
Mohammad Daba'an1-Dec-04 2:13
Mohammad Daba'an1-Dec-04 2:13 
GeneralRe: email Pin
Dave Kreskowiak1-Dec-04 3:30
mveDave Kreskowiak1-Dec-04 3:30 
GeneralRe: email Pin
Mekong River2-Dec-04 10:39
Mekong River2-Dec-04 10:39 
GeneralPackage and Deployment Pin
nitin_ion1-Dec-04 0:27
nitin_ion1-Dec-04 0:27 
GeneralRe: Package and Deployment Pin
Dave Kreskowiak1-Dec-04 3:26
mveDave Kreskowiak1-Dec-04 3:26 
GeneralAbout GUID Pin
iamalik30-Nov-04 19:28
professionaliamalik30-Nov-04 19:28 
GeneralRe: About GUID Pin
Tom John30-Nov-04 22:46
Tom John30-Nov-04 22:46 
GeneralAnother Problem Pin
Tech 4 a dummy30-Nov-04 18:03
Tech 4 a dummy30-Nov-04 18:03 
GeneralRe: Another Problem Pin
Tom John30-Nov-04 22:28
Tom John30-Nov-04 22:28 
GeneralRe: Another Problem Pin
Dave Kreskowiak1-Dec-04 1:05
mveDave Kreskowiak1-Dec-04 1:05 
GeneralRe: Another Problem Pin
Tom John1-Dec-04 1:18
Tom John1-Dec-04 1:18 
GeneralRe: Another Problem Pin
Colin Angus Mackay1-Dec-04 3:09
Colin Angus Mackay1-Dec-04 3:09 
Questionwhat's wrong with this code ? Pin
bahruddina30-Nov-04 16:47
bahruddina30-Nov-04 16:47 
AnswerRe: what's wrong with this code ? Pin
Tom John30-Nov-04 22:39
Tom John30-Nov-04 22:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.