• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 966
  • Last Modified:

iif rs.eof problem from vb6 to vb.net

hey guys i am trying to do a basic if statment in vb.net i am usinf the same as i didnt in vb6 but i am guessing that it is a little different in .net

here is the code i am using

Private Sub save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles save.Click

        Dim rs As New ADODB.Recordset
        Dim sql As String

        sql = "select * from [stock_card] where [stockid] = " & stockn.Text
        If rs.EOF Then
        End If

        rs.Open(sql, cnn1, ADODB.CursorTypeEnum.adOpenDynamic, ADODB.LockTypeEnum.adLockPessimistic)
  • 2
1 Solution
Since you are already shifting to VB .net, may i suggest the use of ADO .net? If you are interested how it is done in ADO .net check this link out. http://www.codeproject.com/cs/database/DatabaseAcessWithAdoNet1.asp

It has a lot of information about how data can be read, represented and written into using ADO .net

If you are lookin for an answer about ur rs.EOF problem, here is a similar discussion going on
Jorge PaulinoIT Pro/DeveloperCommented:
That is past (recordsets), you have to use ADO.NET.

Have a look in here http://samples.gotdotnet.com/quickstart/howto/doc/adoplus/ADOPlusOverview.aspx
awolarczukAuthor Commented:
yea thnaks huys i know it is the past but it is what i know so i was trying to use it, you know move slowly in the the unknown
Jorge PaulinoIT Pro/DeveloperCommented:
>> know move slowly in the the unknown

Thats correct, but you advance in the right direction. Is not so difficult to chance and you will find later more easy and with more advantages.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now