Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hi, I need to pass 10,000 bytes

Status
Not open for further replies.

vechalapu

Programmer
May 2, 2001
58
US
Hi,

I need to pass 10,000 bytes of string data from Visual Basic ADO to a SQL Server Stored Procedure. Right now I am calling SQL Server Stored Procedures 10 times sending 1000 bytes each time. The performanance is slow. Is there any way I send all 10,000 bytes of data to a Stored Procedure so that I can reduce network overhead?

Thanks in advance,
 
Hi,

Thanks for the reply. This 10000 characters string is not constant. The string length can vary based on number of records. Is there any way we can create procedure with variable parameters?

Thanking you,
 
Since you are using ADO, you can create a temporary table and load the value into the table. Your stored procedure could pick up the value from the temporary table.
 
Varchar data type is variable in size. You can declare it as big as 8000 characters and only send as many as needed. You can also declare a default vallue so you only need to use as many variables as needed.

Example:
Create Procedure myProc
-- @var1 is always required
-- it can be up to 8000 characters
@var1 varchar(8000),

-- @var2 2000 characters max len
-- it is not required
-- default is empty string
@var2 varchar(2000)='' Terry L. Broadbent
Programming and Computing Resources
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top