473,386 Members | 1,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

actual record

How obtain the current record ? this is my code:

Dim fila As DataRow

Dim llaveprimaria(0) As DataColumn

llaveprimaria(0) = dasedo.Tables("tabest").Columns("codigo")

dasedo.Tables("tabest").PrimaryKey() = llaveprimaria

fila = dasedo.Tables("tabest").Rows.Find(c_idfind)

Me.BindingContext(dasedo, "tabest").Position = 1 (bad code line help me
please)
May 11 '06 #1
4 960
Jose,

Have a look at this sample where your problem is done.

There is as well your next problem in it.

http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
I hope this helps,

Cor

"Jose" <jo********@unica.com> schreef in bericht
news:e2**************@TK2MSFTNGP04.phx.gbl...
How obtain the current record ? this is my code:

Dim fila As DataRow

Dim llaveprimaria(0) As DataColumn

llaveprimaria(0) = dasedo.Tables("tabest").Columns("codigo")

dasedo.Tables("tabest").PrimaryKey() = llaveprimaria

fila = dasedo.Tables("tabest").Rows.Find(c_idfind)

Me.BindingContext(dasedo, "tabest").Position = 1 (bad code line help me
please)

May 11 '06 #2
Jose,

Please don't start new threads about the same question.

This is not a 10 second answer newsgroup.

Thanks in advance.

Cor

"Jose" <jo********@unica.com> schreef in bericht
news:e2**************@TK2MSFTNGP04.phx.gbl...
How obtain the current record ? this is my code:

Dim fila As DataRow

Dim llaveprimaria(0) As DataColumn

llaveprimaria(0) = dasedo.Tables("tabest").Columns("codigo")

dasedo.Tables("tabest").PrimaryKey() = llaveprimaria

fila = dasedo.Tables("tabest").Rows.Find(c_idfind)

Me.BindingContext(dasedo, "tabest").Position = 1 (bad code line help me
please)

May 11 '06 #3
Cor this link has problems? I don´t access.
"Cor Ligthert [MVP]" <no************@planet.nl> escribió en el mensaje
news:eo**************@TK2MSFTNGP04.phx.gbl...
Jose,

Have a look at this sample where your problem is done.

There is as well your next problem in it.

http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
I hope this helps,

Cor

"Jose" <jo********@unica.com> schreef in bericht
news:e2**************@TK2MSFTNGP04.phx.gbl...
How obtain the current record ? this is my code:

Dim fila As DataRow

Dim llaveprimaria(0) As DataColumn

llaveprimaria(0) = dasedo.Tables("tabest").Columns("codigo")

dasedo.Tables("tabest").PrimaryKey() = llaveprimaria

fila = dasedo.Tables("tabest").Rows.Find(c_idfind)

Me.BindingContext(dasedo, "tabest").Position = 1 (bad code line help me
please)


May 11 '06 #4
Jose,

We are changing thanks for telling this to us.

Here the tip as it is there.

\\\\
Controls Databinding (Textbox), given is here a kind of standard routine for
a textbox and a datatable datetime column, the sample needs only a form with
a textbox and two buttons dragged on it (The sample is based on VB2005
style. For VB2002/2003 you have remove the Import, the Public Class Form1
and the End Class and paste it than in)
--------------------------------------------------------------------------------

Imports System.data
Public Class Form1
Dim ds As New DataSet
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim dt As New DataTable
ds.Tables.Add(dt)
dt.Columns.Add("DateField", GetType(System.DateTime))
Dim Mybinding As New Binding("Text", ds.Tables(0), "DateField")
TextBox1.DataBindings.Add(Mybinding)
AddHandler Mybinding.Format, AddressOf DBdateTextbox
AddHandler Mybinding.Parse, AddressOf TextBoxDBdate
dt.LoadDataRow(New Object() {New DateTime(2005, 8, 4)}, True)
dt.LoadDataRow(New Object() {Nothing}, True)
dt.LoadDataRow(New Object() {New DateTime(2005, 8, 5)}, True)
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
'forward
If BindingContext(ds.Tables(0)).Position _
< ds.Tables(0).Rows.Count Then
BindingContext(ds.Tables(0)).Position += 1
End If
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button2.Click
'backward
If BindingContext(ds.Tables(0)).Position > 0 Then
BindingContext(ds.Tables(0)).Position -= 1
End If
End Sub
Private Sub DBdateTextbox(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value Is DBNull.Value Then
cevent.Value = ""
Else
Dim datum As Date
datum = CDate(cevent.Value)
cevent.Value = datum.ToString("d")
End If
End Sub
Private Sub TextBoxDBdate(ByVal sender As Object, _
ByVal cevent As ConvertEventArgs)
If cevent.Value.ToString = "" Then
cevent.Value = DBNull.Value
Else
Dim datum As Date
datum = CDate(cevent.Value)
cevent.Value = datum
End If
End Sub
End Class

I hope this helps,

cor
"Jose" <jo********@unica.com> schreef in bericht
news:%2****************@TK2MSFTNGP04.phx.gbl...
Cor this link has problems? I don´t access.
"Cor Ligthert [MVP]" <no************@planet.nl> escribió en el mensaje
news:eo**************@TK2MSFTNGP04.phx.gbl...
Jose,

Have a look at this sample where your problem is done.

There is as well your next problem in it.

http://www.vb-tips.com/default.aspx?...9-4deb7fa4a0b8
I hope this helps,

Cor

"Jose" <jo********@unica.com> schreef in bericht
news:e2**************@TK2MSFTNGP04.phx.gbl...
How obtain the current record ? this is my code:

Dim fila As DataRow

Dim llaveprimaria(0) As DataColumn

llaveprimaria(0) = dasedo.Tables("tabest").Columns("codigo")

dasedo.Tables("tabest").PrimaryKey() = llaveprimaria

fila = dasedo.Tables("tabest").Rows.Find(c_idfind)

Me.BindingContext(dasedo, "tabest").Position = 1 (bad code line help me
please)



May 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dave Crypto | last post by:
Hi There, SUMMARY: I need to know what the actual maximum date limit possible on a row of a MYSQL database. MORE DETAILS: For example, does a MYSQL database only allow 4032 bytes of data...
2
by: PaulNaude | last post by:
VB.NET 2003 I am battling with a specific procedure that does not allow me to update my data adapter due to an apparent syntax error. I created the data adapter usign the drag and drop method...
11
by: mailar | last post by:
Hi, I am using DB2 version 8.2 on Windows XP platform. I have a table 'EMP' with one field named 'NAME' of type CHAR , size 80. Also , I have a record with NAME='john' Now, when I try to...
2
by: brandon | last post by:
I've followed the instructions here...
13
by: TC | last post by:
Folks Is there >>ANY<< way to get the actual text of an error that is trapped by the Form_Error event? I mean actual text like: "duplicate record in table XYZ", not template text like:...
0
by: Steve1 via DotNetMonster.com | last post by:
Hi all, I''ve created an OleDbDataReader that will contain the number of records that the used SQL query will return. I'm then using a while loop to loop while the OleDBDataReader object has...
3
by: Prince | last post by:
Hi, could someone either please tell me or point me in the right direction. I have a DataGrid on a page with the DataKeyField="ID". The grid displays checkboxes for each record. I have an...
6
by: astro | last post by:
I'm working through the binder stuff trying to get a handle on it... I have setup a master-detail dataset and have a couple of textboxes from the master along with a datadgrid for the child data....
3
by: jonathan184 | last post by:
script is printing output correct but not the actual output. Basically what the script is doing it taking a 1 flat file then it is splits the file into smaller files in 1000 record increments ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.