Help on appending new records in SQL Tables

Help on appending new records in SQL Tables

Post by Muhammad Naeem Akhat » Sat, 08 Mar 2003 17:55:18



Hi,

I want to append new records in MS SQL 2000 Table, using
the Visual Foxpro.  I have tried the following;

ln_update = SQLEXEC(lc_connect, 'INSERT INTO csfsc
(fscyear, audtuser) VALUES ("2004","NAEM")')

but the table is never updated. even I issued the
SQLCOMMIT(lc_connect) also.

I am in big trouble, please reply in urgency!

Best regards and thanks in advance for your time.
Naeem
Dubai

 
 
 

Help on appending new records in SQL Tables

Post by Fabio Lunardo » Sat, 08 Mar 2003 19:03:34


Hi Muhammad

Use

ln_update = SQLEXEC(lc_connect, "INSERT INTO csfsc
(fscyear, audtuser) VALUES ('2004','NAEM')")

if fscyear is CHAR(4)

OR

ln_update = SQLEXEC(lc_connect, "INSERT INTO csfsc
(fscyear, audtuser) VALUES (2004,'NAEM')")

if fscyear is numeric.

Test ln_update=1 for good end command.

SQL not use " string separator.

Fabio

Quote:>-----Original Message-----
>Hi,

>I want to append new records in MS SQL 2000 Table, using
>the Visual Foxpro.  I have tried the following;

>ln_update = SQLEXEC(lc_connect, 'INSERT INTO csfsc
>(fscyear, audtuser) VALUES ("2004","NAEM")')

>but the table is never updated. even I issued the
>SQLCOMMIT(lc_connect) also.

>I am in big trouble, please reply in urgency!

>Best regards and thanks in advance for your time.
>Naeem
>Dubai
>.