Click here to Skip to main content
15,886,519 members
Home / Discussions / C#
   

C#

 
GeneralRe: Declaration error. Pin
suresh_sathya11-Oct-02 1:18
suresh_sathya11-Oct-02 1:18 
GeneralRe: Declaration error. Pin
Paul Riley11-Oct-02 1:23
Paul Riley11-Oct-02 1:23 
GeneralRe: Declaration error. Pin
Paul Riley11-Oct-02 1:34
Paul Riley11-Oct-02 1:34 
GeneralRe: Declaration error. Pin
leppie11-Oct-02 9:35
leppie11-Oct-02 9:35 
GeneralRe: Declaration error. Pin
Paul Riley11-Oct-02 10:13
Paul Riley11-Oct-02 10:13 
GeneralRe: Declaration error. Pin
Daniel Turini11-Oct-02 1:38
Daniel Turini11-Oct-02 1:38 
GeneralRe: Declaration error. Pin
Luis Alonso Ramos11-Oct-02 9:40
Luis Alonso Ramos11-Oct-02 9:40 
GeneralRe: Declaration error. Pin
leppie11-Oct-02 10:03
leppie11-Oct-02 10:03 
OK I think I might have the answer for you Smile | :)

string selectSQL = "SELECT CustomerID, CompanyName FROM Customers WHERE (Country = @Country) AND (City = @City)";

suresh_sathya wrote:
When i run this program,it says Must declare the variable '@Country'.

string country = "UK";
string city = "London";
selectCMD.Parameters.Add("@Country", OleDbType.VarChar, 15).Value = country;
selectCMD.Parameters.Add("@City", OleDbType.VarChar, 15).Value = city;

Try that too Smile | :)

Hope it helps!


Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
GeneralFinding the * Pin
Nnamdi Onyeyiri10-Oct-02 5:52
Nnamdi Onyeyiri10-Oct-02 5:52 
GeneralRe: Finding the * Pin
Daniel Turini10-Oct-02 6:01
Daniel Turini10-Oct-02 6:01 
GeneralRe: Finding the * Pin
Nnamdi Onyeyiri10-Oct-02 6:01
Nnamdi Onyeyiri10-Oct-02 6:01 
GeneralRe: Finding the * Pin
David Stone10-Oct-02 14:03
sitebuilderDavid Stone10-Oct-02 14:03 
GeneralRe: Finding the * Pin
Eric Gunnerson (msft)11-Oct-02 10:52
Eric Gunnerson (msft)11-Oct-02 10:52 
GeneralRe: Finding the * Pin
David Stone11-Oct-02 13:48
sitebuilderDavid Stone11-Oct-02 13:48 
GeneralEmail header Pin
Tomas Petricek9-Oct-02 12:11
Tomas Petricek9-Oct-02 12:11 
GeneralRe: Email header Pin
leppie9-Oct-02 12:50
leppie9-Oct-02 12:50 
QuestionAbstract Class instance? Pin
ximian9-Oct-02 10:47
ximian9-Oct-02 10:47 
AnswerRe: Abstract Class instance? Pin
Paul Riley9-Oct-02 11:52
Paul Riley9-Oct-02 11:52 
GeneralRe: Abstract Class instance? Pin
ximian9-Oct-02 14:37
ximian9-Oct-02 14:37 
GeneralRe: Abstract Class instance? Pin
ximian10-Oct-02 2:59
ximian10-Oct-02 2:59 
GeneralRe: Abstract Class instance? Pin
Paul Riley10-Oct-02 4:05
Paul Riley10-Oct-02 4:05 
Generaldetecting right click on tabcontrol tab Pin
Darryl Borden9-Oct-02 8:52
Darryl Borden9-Oct-02 8:52 
GeneralHandling of unmanaged code by the .NET environment Pin
abhinarulkar9-Oct-02 6:12
abhinarulkar9-Oct-02 6:12 
GeneralRe: Handling of unmanaged code by the .NET environment Pin
Eric Gunnerson (msft)9-Oct-02 8:31
Eric Gunnerson (msft)9-Oct-02 8:31 
GeneralOrder of events when a form is displayed Pin
Wjousts9-Oct-02 2:00
Wjousts9-Oct-02 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.