hi friends
am new to .net. am using vb.net 05 and sql server 2000. am getting error in my program. plz help to correct and learn
my errors are
myconnection1 has not declared
mydataadapter1 has not declared
mydataset has not declared
but i have declared every thing why its say like that
help me
thanks in advance
Regards
vijay
am new to .net. am using vb.net 05 and sql server 2000. am getting error in my program. plz help to correct and learn
Code:
(vb.net) Imports System.Data.SqlClient Imports System.Data.Sql Public Class Form1 Dim myDataSet As DataSet Dim myConnection1 As New SqlClient.SqlConnection() myConnection1.ConnectionString = "Data Source=vijay;" & _ "Initial Catalog=NorthwindSQL;" Dim mySelectCommand1 As New SqlClient.SqlCommand() mySelectCommand1.CommandText = "SELECT Address, City, Region, PostalCode FROM Customers" mySelectCommand1.Connection = myConnection1 Dim myDataAdapter1 As New SqlClient.SqlDataAdapter() myDataAdapter1.SelectCommand = mySelectCommand1 myDataSet = New DataSet("MyNewDataSet") myDataAdapter1.Fill(myDataSet) End Class
myconnection1 has not declared
mydataadapter1 has not declared
mydataset has not declared
but i have declared every thing why its say like that
help me
thanks in advance
Regards
vijay
Comment