![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 372
Rep Power: 0
![]() |
System.Data
In Visual Studio 2003 I could run the following statement:
cmdUser.Parameters.Add("@firstname", SqlDbType.VarChar, 25).Direction = ParameterDirection.Output;Thanks.
__________________
I am Addicted to Linux! |
|
|
|
|
|
#2 |
|
Programmer
Join Date: Jul 2006
Location: using Earth.Africa.Egypt.Cairo;
Posts: 71
Rep Power: 3
![]() |
i didn't play with VS 2005 but i think what you should do is to write (using System.Data.SqlClient).
|
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 372
Rep Power: 0
![]() |
I have done that...
__________________
I am Addicted to Linux! |
|
|
|
|
|
#4 |
|
Professional Programmer
|
I have these 2 inclusions
using System.Data; using System.Data.SqlClient; and this: cmd.Parameters.Add("@asd",SqlDbType.VarChar,25).Direction = ParameterDirection.Output;compiles fine.
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#5 |
|
Hobbyist Programmer
|
Maybe I can Give you some background info. What I have found is that you have to be more explicit about what Libraries you want the compiler to use. Cause I to had this kind of problem. Best thing to figure out what you need is put in what you think:
cmdUser.Parameters.Add("@firstname", SqlDbType.VarChar, 25).Direction = ParameterDirection.Output; |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Jan 2006
Location: Ontario, Canada
Posts: 372
Rep Power: 0
![]() |
OK I fixed it. I just closed down my project and re-opened it and it compiled fine... very weird.
Thanks for the input guys.
__________________
I am Addicted to Linux! |
|
|
|
|
|
#7 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Yeah, Visual Studio 2003 has these little moments as well, and SQL Server 2005 very occassionally also manages to screw itself up. Just remember you're dealing with Microsoft products, which whilst feature-packed, might not be always consistent and stable.
|
|
|
|
|
|
#8 |
|
Programmer
Join Date: Nov 2006
Location: Kosovė/Prishtinė
Posts: 47
Rep Power: 0
![]() |
Did you tried adding System.Data.Common in using directives and try
CSharp Syntax (Toggle Plain Text)
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|