Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Executing Update or Insert on Server not client
Message
De
15/11/1999 15:09:17
 
 
À
15/11/1999 13:02:13
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
00291205
Message ID:
00291274
Vues:
18
>Fred,
>
>Look at SQL Passthrough. With it, you can send a command to the server where it will be processed and executed.
>
>LOCAL hConn, lnResult
>hConn = SQLCONNECT(...)
>lnResult = SQLEXEC(hConn, [UPDATE table SET colum = newvalue WHERE condition])
>
>In general, you'll get much better performance by calling a stored procedure instead of passing the ad-hoc query each time.
>
>-Mike


We are using SQLEXEC() to execute the Updates and Inserts because the fields in the record sets are different depending on the amount of data entered on each record. We did not want to pass null fields accross the wire or have an extreme number of SP. We were mistaken in thinking that the SQL statements were stilling being executed locally when we used SQLEXEC(). In doing some timing trials, we are going to be using SQLPrepare with SQL execute. In 87% of the trials, the combination of SQLPrepare() and SQLEXEC() were processed in less than half the time as SQLEXEC() a lone. In a few situations the SQLPrepare() and SQLEXEC() were slower (very small data sets).

Thanx for your help.
Fred Lauckner

You know, it works on my computer. I don't know what your problem is.

.Net aint so bad.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform