Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Does anyone know how to do this in vb.net with a data adapter or a dataset?

 

I would like to setup a combobox for users to select "leaseNo"(a lease number) and that will find the record and automatically scroll to that record on the Lease Form.

 

 

rs.MoveFirst

rs.Find "[PROP_NO] = '" & LeaseNo & "'"

rs.Find "[WELL_NO] = '" & WellNo & "'"

rs.Find "[EFFDATE] = '" & CurrRecDate & "'"

Posted

Thanks for your reply...

 

I am using the form wizard which auto creates a connection, adapter and dataset object.

 

In vb6 I dim cn and rs.recordset than use the find of the recordset but i dont know how to do that with the above objects.

  • 2 weeks later...
Posted

in vb 6.0

 

ado.recordsource _

= "SELECT * FROM tbl WHERE NAME = 'George' "

ado.refresh

 

 

in vb.net

 

da.SelectCommand.CommandText _

= "SELECT * FROM tbl WHERE NAME = 'George' "

ds.Clear()

da.Fill(ds)

George C.K. Low

Posted

cool...thanks for your reply

 

also do you know if ado.net has some thing similar to vb6 recordset.absoluteposition?

 

For example, if i had 100 records, in vb6 when i use rs.find it will tell me the absolute position of that record(lets say 55) then i can automatically move to that record position(55 of 100)...

Posted

i am using data adapter and dataset.

 

yes, i would like to know how to find a record and then select the searched record in datagrid using the above two components.

 

for example, 100 rows in table.

the algorithm found the record on row 55, then, the datagrid will be selected on row 55.

 

Please

George C.K. Low

Posted

I think this might not be the right ans. CurrenyManager is used to set or get the position of a particular row.

 

My needs is on how to find a particular record based on some criteria.

 

For example, based on Name Field.

 

I want to search for record of "George" and "George" is in row 98. so, my program will search for"George" and automatically set "Selected" to row 98.

 

Hope that you got my idea.

 

Thanks in advance.

George C.K. Low

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...