home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Stored Procedure

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 1627
Discussions: 200,989, Posts: 2,379,875, Members: 246,359
Old April 6th, 2006, 12:30 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Mar 2006
Posts: 8
Stored Procedure

Hello,

I am working on a VB/SQL application. I have to insert records from VB forms to MS sql tables which are linked via ADO. Considering the constraints of the fields and around 36 total fields in the tables, I am not sure what would be the best and optimal option:-
1. Use an MSSQL stored procedure with all the validation checks and call in the event.
2. Use a VB global function with all the validation checks and call in the respected event.
3. Write the code directly in the event function as and when required.
I would appreciate it if someone can help with my problem.

Thanks in advance.
Jigyasa is offline   Reply With Quote
Old April 10th, 2006, 11:29 AM     #2 (permalink)
Ultimate Member
 
YottaHertz's Avatar
 
Join Date: Nov 2005
Location: KY, US of A
Posts: 1,181
Welcome to TechIMO!

First off, is this a web-based app? If it is you could use JavaScript to perform all the validity checks... I think the best way to go it terms of flexibility would be a stored procedure... PL/SQL
__________________
Bluegrass ROCKS!!!
YottaHertz is offline   Reply With Quote
Old April 12th, 2006, 04:30 PM     #3 (permalink)
Junior Member
 
Join Date: Mar 2006
Posts: 8
Stored Procedure

Thanks for your reply. No, it is not a web based aplication. It's just a usual small office level application.
The only concern I had with using stored procedure was the number of arguments(which would be more than 36 for some inserts) that I would have to pass to the procedure from the VB GUI. Some tables have a lot of fields and to update or insert, the number of arguments thus would be a lot, unless I am thinking on the wrong or not so optimal lines. Any suggestions please.

Thanks very much for your help.

Last edited by Jigyasa : April 12th, 2006 at 04:35 PM.
Jigyasa is offline   Reply With Quote
Old April 12th, 2006, 08:58 PM     #4 (permalink)
Real gangstas sip on Yacc
 
jkrohn's Avatar
 
Join Date: Oct 2001
Location: Suckas-ville
Posts: 4,552
Send a message via ICQ to jkrohn Send a message via AIM to jkrohn Send a message via Yahoo to jkrohn
Quote:
If it is you could use JavaScript to perform all the validity checks...

Please for the love of god, NEVER use javascript to sanitize variables prior to use in SQL queries. Well unless you like SQL injection, in which case use javascript for your checks.

There really isn't a compelling case (performance wise) to dump it into a stored procedure. You should just drop it into the event code. DO NOT use a global function for this or anything else, ever.

Jkrohn
__________________
Signatures blow hard
If your signature contains an ad of any kind, congratulations, you're on my ignore list.
jkrohn is offline   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Similar Threads
Thread Thread Starter Forum Replies Last Post
Procedure to downgrade from XP? friedemann Applications and Operating Systems 2 December 11th, 2005 02:10 PM
Remote Procedure Call? scarecrow1 General Tech Discussion 8 August 12th, 2003 09:59 PM
templates stored VERT Applications and Operating Systems 2 June 2nd, 2003 08:50 PM
install procedure Sanman Applications and Operating Systems 5 December 14th, 2002 09:23 PM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3069)
Charges against non-tippers dropped.. (20)
Health Care Rationing (12)
Delete an OS (17)
Nvidia GTX 260 problem (10)
Laptop with wireless problem. (12)
windows vista security holes (19)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (8)
windows 7 problem (7)
[F@H SPAM 11/16/09] ! 1/2 months to.. (39)
Internet Lost (5)
Recent Discussions
Foxconn Blackops x48 MoBo (0)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Nvidia GTX 260 problem (10)
Point and Shoot Camera Suggestions. (8)
Size after cutting 700Mb file is 2.5 .. (0)
Delete an OS (17)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (39)
windows vista security holes (19)
updating BIOS via winflash, claims fi.. (1)
New Server Configuration Suggestions (0)
cheap gaming laptop? (12)
Unallocated Space (2)
help me pls laptop just stopped worki.. (1)
C# + LINQ Help (7)
Dynex DX E-402 (3)
EVGA 9800 gtx help with finding a goo.. (12)
Multiple Restarts Required at Boot (5)
cell phone won't work (0)
Is the PSU I received dead? (15)
Can't open Word (12)
Steam ID's, Gamertags etc... (4)


All times are GMT -4. The time now is 07:49 AM.
TechIMO Copyright 2009 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28