Carlo Chung (ca********@hotmail.com) writes:
How to use db-lib to update/insert database records without using SQL
language. I want to change the value of the data individually without
plugging in the new values in the SQL language then execute it. The
perfect situation for me is loop through the retrieved records then
edit the values individually until EOF.
It is possible that you can use the dbcursor functions for this, but
I have never tried these functions myself. I am very much in favour
using explicit SQL statement for my updates, so that I know what is
going on.
Also, depending what edits you are about to make, you may win
magnitudes in performance by updating all rows in one statement. Only
use one-by-one processing when absolutely necessary.
There is also a sad tale to tell about DB-Library: Microsoft has deprecated
this fine library, and have not enhanced it since the release of 6.5.
Unless you are working with a legacy application, don't use DB-Library
for development.
If you are dead set on doing updates without SQL statements, you should
use ADO or ADO .Net.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp