A
acko bogicevic
Hi I complityly new in .NET and have a lot of problems
I would like to do basic task:
1) Open connection
2) fill data set
3) find out if dataset is bof or eof but in ado net there is no bof and
eof property haw can i do this task
Here is my code
Dim CN As New SqlConnection
Dim DA As New SqlDataAdapter
Dim DS As New DataSet
Dim cmd As New SqlClient.SqlCommand
Dim strSQL As String
dim cnString as String
cnString = "someString"
strSQL = "SELECT SUBJEKT,GESLO from CONTACTS " _
& " WHERE USERID = '" & UserName & "'"
CN.ConnectionString = cnString
cmd.CommandText = strSQL
cmd.CommandType = CommandType.Text
cmd.Connection = CN
CN.Open()
DA.SelectCommand = cmd
DA.SelectCommand.ExecuteNonQuery()
Try
DA.Fill(DS)
Catch ex As Exception
End Try
Here i want to ask for dataset if it is bof or eof
Thanks
Aleksandar
acko
I would like to do basic task:
1) Open connection
2) fill data set
3) find out if dataset is bof or eof but in ado net there is no bof and
eof property haw can i do this task
Here is my code
Dim CN As New SqlConnection
Dim DA As New SqlDataAdapter
Dim DS As New DataSet
Dim cmd As New SqlClient.SqlCommand
Dim strSQL As String
dim cnString as String
cnString = "someString"
strSQL = "SELECT SUBJEKT,GESLO from CONTACTS " _
& " WHERE USERID = '" & UserName & "'"
CN.ConnectionString = cnString
cmd.CommandText = strSQL
cmd.CommandType = CommandType.Text
cmd.Connection = CN
CN.Open()
DA.SelectCommand = cmd
DA.SelectCommand.ExecuteNonQuery()
Try
DA.Fill(DS)
Catch ex As Exception
End Try
Here i want to ask for dataset if it is bof or eof
Thanks
Aleksandar
acko