Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Some question's
Message
From
18/06/2002 23:16:13
 
 
To
16/06/2002 15:51:40
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
General information
Forum:
Microsoft SQL Server
Category:
Other
Title:
Miscellaneous
Thread ID:
00669032
Message ID:
00669993
Views:
7
>1) In large Tables, whitch is the performance difference using SQL-Stored Procedures,
>passing just the procedure's name + parameters using SQLEXEC(), from sending a query
>Statement + parameters to a remote server using pass through.
>(is the responce time difference here just the difference form the moment that SQL receives
>the statement, analyses, seek permissions, etc.. till it starts to process the statement, like when calling an SP ?)

It is fairly negligable. Also, if you are sending the same query many times you can SQLPrepare() which will move all the overhead to the first time you run the query.

>Should the responce time increase if the SQL Server Statement is more complex ? If yes how much more time it would take. ( just an idea of time increase )

As with the above, you will have to do some performance testing with your own data and queries.

>2) It's better to use Remote views or Cursors, this questions is due, that I discovered
>that I only can control Error messages sended by SQL using Stored Procedures (SP).
>Remote views look very good, but in a one-to-many form, when I try to update or insert in the
>"many records part" sending Tableupdate(), I dont see a way to get what record got an error from
>the server, and so I could send a specific error message, is there a way to do it ?

Sure, did you look at the fourth parameter of TableUpdate()???

From the VFP doc:

cErrorArray
Specifies the name of an array created when nRows is 2 and changes to a record cannot be committed. The array contains a single column containing the record numbers of the records for which changes could not be committed. If you include an array name, you must include either a table or cursor alias cTableAlias or a work area number nWorkArea.
Note If an error other than a simple commit error occurs while updating records, the first element of cErrorArray will contain –1 and you can then use AERROR( ) to determine the why the changes could not be committed.


>3) I was thinking in develop in VFP something that could create "SQL-SP scripts" for Update,
>Insert, Delete, getting the table structure of some table, generating the parameters with
>the same name of the field starting with an 'p_' so each parameter it would look like '@p_field_name' at the beggining of an SP passed as a parameter.
>Reason: Save time in writing SQL-SP.

Um, there is an article in SQL Server Mag that has some SP's that write SQL SP's for you similar to what you want. You could probably adapt them. Let me see if I can find a link:

http://www.pinpub.com/sq/SQmag.nsf/Index/8E0E241F7CD20663852568D00076FB30?opendocument

>Does exist some class/product that does this ?

Actually, yes, the product actually goes further than that. Check out DataClas for VFP at http://www.redmatrix.com/default.asp?section=dataclasvfp


>
>Thanks in Advance
>
>Peter

Sure, hope this info helps,
BOb
Previous
Reply
Map
View

Click here to load this message in the networking platform