CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Guest

    ADO, Stored Procedure, Speed?

    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




  2. #2
    Guest

    Re: ADO, Stored Procedure, Speed?

    Sorry for incomplete info. I am using SQL7 server.


  3. #3
    Join Date
    Dec 1999
    Location
    Texas
    Posts
    96

    Re: ADO, Stored Procedure, Speed?

    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


  4. #4
    Guest

    Re: ADO, Stored Procedure, Speed?

    Thanks Rippin for your help!

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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured