Yet another Access to MSSQL ?

mrgreen

Registered User.
Local time
Yesterday, 21:18
Joined
Jan 11, 2008
Messages
60
I have a couple tables in MSAccess 2003 and I'm trying to send the information to MSSQL 2005. I keep getting an alarm saying "Invalid object name tbllocal scrap has occurred. Is this because tbllocalscrap exists in MSAccess and not in MSSQL

Here is my code. I'm fairly new to this stuff so any help would be greatly appreciated.

strSQL = "INSERT INTO tblmainscreenscrap([Incr],[Date entered],[Time entered],[Name],[Shift],"
strSQL = strSQL + "[Area],[Part Number],[WO Number],[Category],[Reason],"
strSQL = strSQL + "[Qty],[Comments])"
strSQL = strSQL + " SELECT "
strSQL = strSQL + "tbllocalscrap.[Incr],"
strSQL = strSQL + "tbllocalscrap.[Date entered],"
strSQL = strSQL + "tbllocalscrap.[Time entered],"
strSQL = strSQL + "tbllocalscrap.[Name],"
strSQL = strSQL + "tbllocalscrap.[Shift],"
strSQL = strSQL + "tbllocalscrap.[Area],"
strSQL = strSQL + "tbllocalscrap.[Part Number],"
strSQL = strSQL + "tbllocalscrap.[WO Number],"
strSQL = strSQL + "tbllocalscrap.[Category],"
strSQL = strSQL + "tbllocalscrap.[Reason],"
strSQL = strSQL + "tbllocalscrap.[Qty],"
strSQL = strSQL + "tbllocalscrap.[Comments]"
strSQL = strSQL + " FROM tbllocalscrap"

cnt.Execute (strSQL)


Thanks for your time
 

Users who are viewing this thread

Back
Top Bottom