mubama0n
asked on
SQL Command Question
Hi , I tried to Define The (Sqlcommand) Class On my application , But It gives me an erro in the difinition , I do like this :
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.OleDb.OleDbDat aAdapter
Imports System.Data.SqlClient.SqlC ommand
---
Dim Cmd as SqlCommand '---> Here It gives me a blue line under the (SqlCommand).
Imports System.Data
Imports System.Data.OleDb
Imports System.Data.OleDb.OleDbDat
Imports System.Data.SqlClient.SqlC
---
Dim Cmd as SqlCommand '---> Here It gives me a blue line under the (SqlCommand).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanlks for your recommendation.
The Imports statement is not a requirement it is simply for coding convenience so that shorter names can be used.
In your sample if you change the Dim part as following it might work:
Dim Cmd as System.Data.SqlClient.SqlC
If you start declaring all the variables as like the above one then the code might be too messy, so it is better to Import the Namespace and then proceed.