Question

Locked

Copy table from ODBC to SQL in .NET

By kwengiel ·
I need help to create a copy of a table from a ODBC database to an SQL database. I have successfully created an open connection to the SQL database, but it doesn't copy the table from the ODBC database. I'm using the following code:

'----------------------
'Open connection to SQL

Dim objSQLConn As ADODB.Connection = New ADODB.Connection
With objSQLConn
.ConnectionString = "Provider=SQLOLEDB;"
.Open(cnstSQLConnStr)
End With

strSQL = "SELECT * INTO [" + strTableName + "] FROM [" + strTableName + "] in ''[ODBC;DSN=MySystemDSNName];"

objSQLConn.Execute(strSQL)

I've been searching the web for help for days. Any help would be appreciated!!!
Many thanks in advance.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums