Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Development Tools
 ASP.NET
 Passing LONG data thru Parameters

Author  Topic 

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-04-16 : 22:04:03
I read somewhere a while back about limitations to the amount of data sent thru parameters. I forgot where and what exactly what is was about. So, I'm researching it now. My question is this:

Is it possible to send EVERY piece of data no matter the data-type thru parameters? I think I thought I read that the limit was 4000, or 8000, but what about my text fields? i have coded everything that are text fields thru manually writing the sql statement on the application level then executing the statemwnt, but then I can't have SQL Server optimize those statements. Is this true or can long text data-type values be sent thru parameters and how?

Thanks.

- RoLY roLLs

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-04-16 : 22:49:00
Also, I have grown accustom to specify the data-type size as the length of the data I am sending. Example below:

cmd.Parameters.Append .CreateParameter("@MakeType", adChar, adParamInput, LEN(Form_MakeType), Form_MakeType)

Is this good? Bad? A better way? Should I specify the data-type size I have on the table? Any input will be appreciated.

Thanks.

- RoLY roLLs
Go to Top of Page

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-04-18 : 00:29:43
Also, what about integers? Fields in my tables that are data-type of INT, I notice the size is 4. So when I add a parameter, the size is 4? I been reading alittle on this, but not quite sure about it, especially since I work better with examples.

Thanks.

- RoLY roLLs
Go to Top of Page

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-04-21 : 12:18:24
Hello? Anyone out there? Or is everyone paying attention to that "NewB Development Question" post? Hehe.

- RoLY roLLs
Go to Top of Page

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2004-04-21 : 21:58:49
So many questions....

Read up on Datatypes in BOL, that will explain the maximums for things like Varchars (8000) and nvarchar(4000). The length of 4 for an int is the amount of storage space it takes up in a row. You don't actually need to specify that in your parameters.

As for your ADO parameters, you specify the size of the field / stored proc parameter rather than the length of the actual data you are passing.

Look up these in BOL :

"data types-SQL Server, described"

"create table" (scroll down to "Remarks" and read about the maximum bytes per row)



Damian
Go to Top of Page

RoLYroLLs
Constraint Violating Yak Guru

255 Posts

Posted - 2004-04-21 : 23:09:57
Ok thanks. I did look in BOL, guess it's just so big I either missed it or never came across it. Thanks.

- RoLY roLLs
Go to Top of Page
   

- Advertisement -