Hi,
From an asp page I am trying to copy data from one table in my PAC.mdb into another database called TestCopyTo.mdb. They both sit elsewhere on the server. I tried using the code below but I get an error (shown at bottom)
<%
Dim SQLstatement As String = "Insert Into 9809 Select * From SinglePAC IN " _
C:\database\PAC.mdb"
Dim myOleDBConnection As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database\TestCopyTo.mdb")
Dim myOleDBCommand As New OleDbCommand(SQLstatement, myOleDBConnection)
myOleDBCommand.Connection.Open()
myOleDBCommand.ExecuteNonQuery()
myOleDBCommand.Connection.Close
%>
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/PAC/CreatePACtemp.asp, line 29, column 17
Dim SQLstatement As String = "Insert Into 9809 Select * From SinglePAC IN " _
----------------^
Has anyone done anything like this before? If so can you pls share your insight?
Thx
From an asp page I am trying to copy data from one table in my PAC.mdb into another database called TestCopyTo.mdb. They both sit elsewhere on the server. I tried using the code below but I get an error (shown at bottom)
<%
Dim SQLstatement As String = "Insert Into 9809 Select * From SinglePAC IN " _
C:\database\PAC.mdb"
Dim myOleDBConnection As OleDbConnection = New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database\TestCopyTo.mdb")
Dim myOleDBCommand As New OleDbCommand(SQLstatement, myOleDBConnection)
myOleDBCommand.Connection.Open()
myOleDBCommand.ExecuteNonQuery()
myOleDBCommand.Connection.Close
%>
Error Type:
Microsoft VBScript compilation (0x800A0401)
Expected end of statement
/PAC/CreatePACtemp.asp, line 29, column 17
Dim SQLstatement As String = "Insert Into 9809 Select * From SinglePAC IN " _
----------------^
Has anyone done anything like this before? If so can you pls share your insight?
Thx