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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 DbType

Author  Topic 

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-02-09 : 10:46:34
Hello,

I am declaring a parameter in an SQL 2005 procedure as follows:

DECLARE @Feedback INT

What is the correspondent data type in my .NET code?

DbType.Int64, DbType.Int32, DbType.Int16 or something else?

Thanks,

Miguel

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2007-02-09 : 11:01:12
DbType.Int32


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-02-09 : 11:03:54
Why DbType?

Make use of SqlDbType.Int.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-02-09 : 11:12:00
I am using Enterprise Library 2.0 for .Net so since I am developing common code for SQL and Oracle I think I should use DBType.

Thanks,
Miguel
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-02-09 : 11:14:56
Then Peter's answer is more appropriate.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

shapper
Constraint Violating Yak Guru

450 Posts

Posted - 2007-02-09 : 11:21:56
This might come handy:

http://msdn2.microsoft.com/en-us/library/ms131092.aspx

;-)

Thanks,
Miguel
Go to Top of Page
   

- Advertisement -