lnresult3 = SQLEXEC(gnhandle, "INSERT INTO " + lcTempFile + " (custno) VALUES ('test')")
>
>I'm having trouble passing a parameter of a temp file name to a SQL insert statement. I've figured out how to do it for a stored procedure I've written to create the proper table structure (where lnresult1 is assigned), and the temp table is being created properly. I just can't get the same technique (or any other) to pass the same temp table name as a parameter to an insert statement. Any thoughts are appreciated. Thanks!
>
>Rick
>
>************
>
>gnHandle = SQLCONNECT('SQL.ORACLE.PROACCESS', 'sa', 'golden')
>lcTempFile = 'temp' + SYS(3)
>
>lnresult1 = SQLEXEC(gnhandle, "EXEC spCreateTempImport ?lcTempFile" )
>
>*-- this works for a known table
>lnresult2 = SQLEXEC(gnhandle, "INSERT INTO tblImportAll (custno) VALUES ('test')")
>
>*-- but I can't find the right syntax to send the temp file name to the INSERT statement
>lnresult3 = SQLEXEC(gnhandle, "INSERT INTO ?lcTempFile (custno) VALUES ('test')")
>lnresult4 = SQLEXEC(gnhandle, "INSERT INTO ?(lcTempFile) (custno) VALUES ('test')")
>lnresult5 = SQLEXEC(gnhandle, "EXEC (INSERT INTO ?lcTempFile (custno) VALUES ('test') )" )
>lnresult6 = SQLEXEC(gnhandle, "EXEC (INSERT INTO ?(lcTempFile) (custno) VALUES ('test') )" )
>lnresult7 = SQLEXEC(gnhandle, "INSERT INTO (?lcTempFile) (custno) VALUES ('test')")
>lnresult8 = SQLEXEC(gnhandle, "EXEC (INSERT INTO (?lcTempFile) (custno) VALUES ('test') )" )
--sb--