How do I copy a table from one SQL CE Server db into another?

Tech-Archive recommends: Fix windows errors by optimizing your registry



Hello

I am trying to copy a table from one database into another, user named, database. The code I have is not working and I don't know why. Please help.

Thanks

:L

'Create and open connection.
Dim ssceconn As New SqlCeConnection("Data Source = \Program Files\data\projects\" & Me.Text & "\" & Me.Text & ".sdf")
ssceconn.Open()

Dim strIn As String
Dim strOut As String

strIn = "\Program Files\data\projects\" & Me.Text & "\" & Me.Text & ".sdf"
strOut = "\Program Files\data\tabs\header\spec.sdf"

Dim sqlImport As New SqlCeCommand("SELECT * INTO strIn.dbo.[tblHeader] FROM strOut.dbo.[tblHeader]", ssceconn)
sqlImport.ExecuteNonQuery() I get the following error here: There was an error parsing the query. [ Token line number = 1,Token line offset = 10,Token in error = INTO ]

' Close the connection
ssceconn.Close()
ssceconn.Dispose()
ssceconn = Nothing

engine.Dispose()
engine = Nothing
Beep()
MsgBox("import done")
.



Relevant Pages

  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... It looks like your databases folder is outside the root of your web ... I created a database exactly as you said, the only change I made was to ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Is This Possible ... ? Yes - Upload images to an Access database
    ... I created a database exactly as you said, the only change I made was to ... upload it into the 'databases' folder, and not a folder called 'App_Data', ... and underneath an 'upload' button and a 'view images' button. ... Dim con As New Data.OleDb.OleDbConnection ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: mailmerge and sql
    ... that is essentially a database application with a document ... the recordset to the Word Template and use it as if I got ... >> using an ADO recordset as a datasource (if it could be ... >Dim oCatalog As ADOX.Catalog ...
    (microsoft.public.word.mailmerge.fields)
  • Requery of Listbox does not display new data
    ... add a record to the database. ... Then the Lisbox control's requery method is ... The ADO command is run using a connection string to the mdb containing the ... Dim cmd As ADODB.Command ...
    (microsoft.public.access.formscoding)