Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Updating a SQL Database.
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP3
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
00971565
Message ID:
00971595
Views:
19
Thanks for your reply.. but I think I did not explained well what I want...
What other instructions/command/functions can I use for inserting/updating/deleting records in a SQL Database? i.e.: Append blank & replace?

>>Hi.
>>What options do I have to insert records in a table stored in a SQLServer database?
>>I'm using
insert into <table> values (<values>)
>>Are there more options?
>>
>>Thanks in advance.
>
>You can make generic procedure to create the SQL for you. Something that would loop through all the fields in a cursor or table to build the SQL. The generated syntax would look something like:
>
>insert into table_name (field1name, field2name, ...) values
>(?table_name.field1name, ?table_name.field2name, ...)
>
>If you use ?table_name.field1name syntax, the values of those fields will be used when the SQL is executed, and you will not have to deal with the data types. For character data going into varchar columns, you can have your generator create ?RTRIM(table_name.fieldXname) instead.
>
>FWIW, I would not leave out the field name list. If you do, then your table structure must not change. By including the field list, you do not have to worry about column order of the table.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform