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,

I hope this 10,000 bytes are of BLOB type. Binary
Large Object data are stored in special datatypes.
like text datatype in SQL Server. I guess you know
about it.

OK, now, you can use "getchuck" and "appendchuck"
methods of Field object of ADO.

You can pass all data at a time or You can use
a loop to pass it in chunks.

I hope its enough. If you need further details.
Reply me.


Bye
If this post is helpfull to you then
please mark this post as helpfull or
expert post.
 
Hi,

Thanks for the reply. This string data is not constant. This string can vary anywhere from 300 bytes to 1M. I think if you pass any data to SQL Server stored procedure morethan 4000 bytes, it is not sure that all string is passed to the database in the same order as passed. The passing string data more than 4000 bytes to stored procedures is not recommended.

My preference would be if possilbe to create a SQL Server stored procedure dynamically from VB with (length(string))/4000 parameters and call the new stored procedure to pass all the string data all at once to the Server.

Is it possible to create a Stored Procedure in VB during run time.

Thanking You,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top