Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Newbie ? on validating user input
Message
From
17/10/2006 18:26:41
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01162741
Message ID:
01162751
Views:
14
>I wanted to run by you all the approach I am thinking to implement to have the application validate user entry in several records.
>
>Here is briefly how the application work. User enters several records of data in a cursor (in VFP application). I need to validate that the entries in the key field exist in a table in database. Here is the plan:
>
>1. Convert data entry cursor to an XML string.
>2. Pass XML string to a Stored Procedure.
>3. In the Stored Procedure, the XML string is converted to a TEMP cursor (honestly I don't know if it could be done in SQL Server SP though).
>4. Then, in the same Store Procedure, a SQL Select is created against the table in the database with JOIN to the TEMP cursor/table.
>5. Compare results of the SQL Select with the TEMP cursor to see if all values in TEMP cursor were found in the table.
>6. Return XML string with the values Not found in the table.
>
>Does the above seem like the right approach?
>
>If you have any better suggestion, please let me know.
>
>Thank you in advance.

Dmitry,
Though you could do that I think XML conversion is an unnecessary and consumes more bandwidth. Cehck for a sample joining VFP tables with SQL tables using different approaches (temp table and openrowset):
Re: Joining remote table with local cursor Thread #921514 Message #921530
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform