Click to See Complete Forum and Search --> : ADO, Stored Procedure, Speed?


January 5th, 2000, 11:58 AM
Purpose: do a database search with UP to Five parameters(in one string
separeted by *)
Approach: VB code calls a stored procedure, using ADO access method
Questions: where to separate these parameters with the speed concern, in VB
code or SP?
Is it possible to separate a string in SP(which I prefer)? How?
Any ways to make a SP with varying parameters?

Thank you for your comments and suggestions in advance

January 5th, 2000, 12:08 PM
Sorry for incomplete info. I am using SQL7 server.

Rippin
January 5th, 2000, 12:44 PM
I'm not sure exactly how to solve you problem,
but I do know you can seperate a string (given
a seperator character) into an array. This
works like so:


Dim strArray() as string
Dim vntParameter as Variant
'
strArray = Split("Parameter1*Parameter2*" _
& "Parameter3","*",5)
'
'If you ommit the 5, then you will receive
'as many return values as there are strings
'seperated by *'s.
'
'The value for delimeter "*" can be any
'string. If ommitted it seperates string by
'spaces.
'
for Each vntParameter In strArray
MsgBox vntParameter
next vntParameter




I know this doesn't solve your problem, but
maybe it will help you parse out your string
of parameters (search values).

Hope it helps,
Rippin

January 5th, 2000, 01:59 PM
Thanks Rippin for your help!

Anyone knows functions or ways to do same things using SQL?