iif rs.eof problem from vb6 to

Posted on 2007-10-13
Last Modified: 2013-11-26
hey guys i am trying to do a basic if statment in 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)
Question by:awolarczuk
    LVL 21

    Expert Comment

    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.

    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
    LVL 48

    Expert Comment

    That is past (recordsets), you have to use ADO.NET.

    Have a look in here

    Author Comment

    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
    LVL 48

    Accepted Solution

    >> 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.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Suggested Solutions

    More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
    Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video discusses moving either the default database or any database to a new volume.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now