[Last Call] Learn how to a build a cloud-first strategyRegister Now


iif rs.eof problem from vb6 to vb.net

Posted on 2007-10-13
Medium Priority
Last Modified: 2013-11-26
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)
Question by:awolarczuk
  • 2
LVL 21

Expert Comment

ID: 20072936
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
LVL 48

Expert Comment

ID: 20073963
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

Author Comment

ID: 20075442
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

jpaulino earned 2000 total points
ID: 20076929
>> 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 3 hours left to enroll

831 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