General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Hi Harry,
m.realkey, m.kcurrent, ecc., make no sense to the remote source because they are VFP variables and the remote source doesn't know their values.
You should preface the variable name with a "?" so VFP will substitute the value "before" send the command:
=SQLEXEC(gnhandle,"insert into vizkeys (realkey,kcurrent,date_used,kprevious,knext,date_up,crypt_key,mess_hash,ownerkey) values (?m.realkey,?m.kcurrent,?m.date_used,'','',?m.date_up,'','',?m.ownerkey)",'real')
Franco
>I've just tried
>
>SQLEXEC(gnhandle,"insert into vizkeys (realkey,kcurrent,date_used,kprevious,knext,date_up,crypt_key,mess_hash,ownerkey) values (m.realkey,m.kcurrent,m.date_used,'','',m.date_up,'','',m.ownerkey)",'real')
>
>and got this error message:
>
>"The name 'realkey' is not permitted in this context. Only constants, expressions,or variables allowed here. Column names are not permitted."
>
>which makes no sense to me whatever, as Column names would seem to be an obvious requirement when we're inserting records!!
>
>and while we're on the subject, even if I can straighten out that syntax, reading around the various guides to SQL, individual inserts looks like it would be an inefficient way to add, for example, 10000 records to a table with several million. Anyone know where to find a step by step guide to that kind of insertion?
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only