|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
adovbs.inc doesn't support the Text data type
I'm using the adovbs.inc file primarily because it defines the SQL Server data types such as adVarChar and adInteger but it doesn't have one for the SQL Server Text datatype.
Can anyone help me?
__________________
Kind Regards, John Rebbeck john@interspire.com ICQ# 74637937 |
|
#2
|
||||
|
||||
|
Why are you needing to define SQL data types in your ASP?
|
|
#3
|
|||
|
|||
|
I'm using stored procedures and I need to specify the data type of each parameter. I'm using the ADODB.Command object to execute the procs.
|
|
#4
|
||||
|
||||
|
Ahh - I've seen a few people do it that way (using .command). I've never done it like that myself. I just use the .execute method. Is there much difference in either method?
|
|
#5
|
|||
|
|||
|
If you are using stored procs then I would definitely recommend using the command object, it seems to work well except for the fact that I can't figure out how to use the Text data type.
|
|
#6
|
||||
|
||||
|
yeah, but how is using the command object any different to:
set rs = server.createobject("adodb.recordset") rs.open "sp_mySQLStoredProc value1, 'value2'", DBConn (returns recordset) or DBConn.execute("sp_mySQLStoredProc value1, 'value2'") (just executes the string) |
|
#7
|
|||
|
|||
|
I'm not sure but I think using the command object is probably faster because it specifies data types and lengths and stuff, that's sort of how it works in ADO.NET, the more info you specify the less it has to figure out for itself.
It's also easier to maintain because you aren't creating a broken statement (ie. "EXEC MySP '" & val1 & "'") which can be very tedious to maintain. Using the command object and parameters you can take advantage of output parameters which are very handy at times. Other than that I think it's just personal preference. |
|
#8
|
|||
|
|||
|
I'm Lazy
Hi John,
When I use the command object, I just use .parameters (@contents) = scontents (above that I would have had scontents = Request.Form("strContents"). and then in the stored proc itself I have: @contents as text But I'll see if I can find a reference to the datatype in my notes. |
|
#9
|
|||
|
|||
|
Ahh thanks very much I didn't realise you could do it that way, that's much quicker if I'm in a hurry to get the code finished. I have been told that 'adLongVarChar' is used for the 'text' data type although I've yet to try it.
|
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > adovbs.inc doesn't include the Text datatype |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|