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.
Author |
Topic |
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2004-03-26 : 08:58:56
|
[code]this.sqlInsertCommand1.Parameters.Add(new System.Data.SqlClient.SqlParameter("@attained", System.Data.SqlDbType.Bit, 1, "attained"));[/code]is the above the correct length value for Bit in ADO.NETThinking it might want , , (nothing) as it defaults,maybe a different constructor?edit:1 seems fine, yippee. |
|
afterburn
Starting Member
28 Posts |
Posted - 2004-03-29 : 14:32:14
|
No its 4 bytes long. |
 |
|
Sitka
Aged Yak Warrior
571 Posts |
Posted - 2004-03-30 : 13:04:03
|
Thanks. Can you tell me how to find this out? In the ADO days I had some nice appendi' to reference for this stuff.edit. ?????? April 1 ????? |
 |
|
afterburn
Starting Member
28 Posts |
Posted - 2004-04-29 : 11:39:00
|
They have not changed from ADO to .net actually if you look into it ADO in .net is called ADO.net. The types are the same the only difference is that some functions use DbType enumeration which is a pain if you need to map them to SqlDbType enumeration. By default varchar's are ANSI String in the enumeration. |
 |
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2004-04-29 : 20:08:14
|
Just use a different constructor, the length property is really just for specifiable sized types (char, varchar, varbinary etc)Damian |
 |
|
|
|
|