Re: prepared sql statements



sir actually the thing is that i am using "odbc api" which is a part of
vc++ so i have asked it to vc group . i know the syntaz of insert into
statement but when i m using the feature odbc api that is "prepared sql
statements" the problem happens. which already i had described
so please if u have any solution then tell me.

Bob Barrows [MVP] wrote:
kaushal wrote:
i had made the simple application to insert a single record to visula
foxpro table(assume that table is having only one field) using
prepared statement but now when i have to insert more than one data
each time i have to bind that row and each time i have to use
SQLExecute function, so is it possible to insert multiple data by
just using single time execution of SQLExecute() function if it is
possible then plz help me.

I don't know. It depends on if Foxpro supports batched sql statements. You
might try asking in a foxpro group.

In other databases, you can use a union query to insert multiple records:

insert into table (col1)
select val1
union all select val2
union all select val3

Again, I don't know if foxpro supports this.

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"

.



Relevant Pages

  • Re: prepared sql statements
    ... prepared statement but now when i have to insert more than one data ... It depends on if Foxpro supports batched sql statements. ... you can use a union query to insert multiple records: ... This email account is my spam trap so I ...
    (microsoft.public.data.ado)
  • Re: UNION with ORDER BY via ODBC Driver failing
    ... More than likely a bug as the VFP ODBC driver hasn't been updated since ... Microsoft Visual FoxPro MVP ... Unlimited number of UNION SELECT statements. ... UNION SELECT CustName,CustCont2 FROM Customers WERE!Empty ...
    (microsoft.public.fox.programmer.exchange)
  • Re: UNION with ORDER BY via ODBC Driver failing
    ... I can understand the undocumented portions, such as names working instead of column numbers but my ultimate problem is that the "master" ORDER BY for the entire UNION appears to be ignored if, and only if, I submit the SELECT via the odbc driver. ... Using the Visual FoxPro 6 ODBC driver order by clauses on Unions are being ignored. ... UNION SELECT CustName,CustCont2 FROM Customers WERE!Empty ...
    (microsoft.public.fox.programmer.exchange)
  • Re: UNION with ORDER BY via ODBC Driver failing
    ... You could try sticking the ORDER BY into any of the queries before the last ... Unlimited number of UNION SELECT statements. ... UNION SELECT CustName,CustCont2 FROM Customers WERE!Empty ... Via the FoxPro IDE it returns as expected... ...
    (microsoft.public.fox.programmer.exchange)
  • UNION with ORDER BY via ODBC Driver failing
    ... Using the Visual FoxPro 6 ODBC driver order by clauses on Unions are being ignored. ... UNION SELECT CustName,CustCont2 FROM Customers WERE!Empty ... For documentation I have access to the MSDN of FoxPro 7/8/9 and an old dusty FoxPro 2.6 For Windows book. ...
    (microsoft.public.fox.programmer.exchange)