Can't return data through Binding Context.

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

Hello all -

I'm really having a bizarre problem that I'm hoping to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark
 
I'm faily new (< 6 months) with working with .Net so if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext(Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Mark said:
Hello all -

I'm really having a bizarre problem that I'm hoping to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark


.
 
My first thought, are you filling the DataSet?

sqlDataAdapter1.Fill( dataSet11 )

You don't need to add the Binding to the Collection because your first call
does that already.

NewBinding = txtTest.DataBindings.Add("Text", dsIRHeaderMain,
"IRHeader.IR Start Date")

Does the column header "IR Start Date" really have spaces in it?

If .Position = .Count - 1 Then
Beep()

I'd do .Position >= .Count - 1 just in case .Count is zero.

~Greg

Mark said:
I'm faily new (< 6 months) with working with .Net so if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext(Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Mark said:
Hello all -

I'm really having a bizarre problem that I'm hoping to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark


.
 
There are a few separate, non-related places on the form
that I fill datasets.

Yeah, the field does have spaces - - - didn't design the
db myself. The value for ".position" has always been -1
so far, which I'm assuming meant there are no records,
hence the logic.

I can send you my source .vb file(s) to give a better
vision also.

Mark
-----Original Message-----
My first thought, are you filling the DataSet?

sqlDataAdapter1.Fill( dataSet11 )

You don't need to add the Binding to the Collection because your first call
does that already.

NewBinding = txtTest.DataBindings.Add("Text", dsIRHeaderMain,
"IRHeader.IR Start Date")

Does the column header "IR Start Date" really have spaces in it?

If .Position = .Count - 1 Then
Beep()

I'd do .Position >= .Count - 1 just in case .Count is zero.

~Greg

Mark said:
I'm faily new (< 6 months) with working with .Net so if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext(Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Hello all -

I'm really having a bizarre problem that I'm hoping to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark


.


.
 
When I did a sample program, my .Position started at 0. (that was in C#, but
I'd think it'd be the same ).

If you want to send your files I'd look at them.

~Greg
Mark said:
There are a few separate, non-related places on the form
that I fill datasets.

Yeah, the field does have spaces - - - didn't design the
db myself. The value for ".position" has always been -1
so far, which I'm assuming meant there are no records,
hence the logic.

I can send you my source .vb file(s) to give a better
vision also.

Mark
-----Original Message-----
My first thought, are you filling the DataSet?

sqlDataAdapter1.Fill( dataSet11 )

You don't need to add the Binding to the Collection because your first call
does that already.

NewBinding = txtTest.DataBindings.Add("Text", dsIRHeaderMain,
"IRHeader.IR Start Date")

Does the column header "IR Start Date" really have spaces in it?

If .Position = .Count - 1 Then
Beep()

I'd do .Position >= .Count - 1 just in case .Count is zero.

~Greg

Mark said:
I'm faily new (< 6 months) with working with .Net so if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext(Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the
DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Hello all -

I'm really having a bizarre problem that I'm hoping to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a
data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in
the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark


.


.
 
Thanks Greg......do I assume that email is the same just
drop the "spam" part?
-----Original Message-----
When I did a sample program, my .Position started at 0. (that was in C#, but
I'd think it'd be the same ).

If you want to send your files I'd look at them.

~Greg
Mark said:
There are a few separate, non-related places on the form
that I fill datasets.

Yeah, the field does have spaces - - - didn't design the
db myself. The value for ".position" has always been - 1
so far, which I'm assuming meant there are no records,
hence the logic.

I can send you my source .vb file(s) to give a better
vision also.

Mark
-----Original Message-----
My first thought, are you filling the DataSet?

sqlDataAdapter1.Fill( dataSet11 )

You don't need to add the Binding to the Collection because your first call
does that already.

NewBinding = txtTest.DataBindings.Add("Text", dsIRHeaderMain,
"IRHeader.IR Start Date")

Does the column header "IR Start Date" really have spaces in it?

If .Position = .Count - 1 Then
Beep()

I'd do .Position >= .Count - 1 just in case .Count is zero.

~Greg

I'm faily new (< 6 months) with working with .Net so if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add ("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext (Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the
DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Hello all -

I'm really having a bizarre problem that I'm
hoping
to
appeal to the experts on. Running .Net 2003, framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a
data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I
want
to
return. Yet when I try to use my navigate buttons "<"
and ">" on my form, it states there are zero rows in
the
table when I know there isn't.

Please pass along what I could be doing wrong. This is
really a pain!

Thanks,
Mark


.



.


.
 
gpersson @ *NOSPAM * ywaite.com

Remove the no spam from that.

The other address should work as listed, but spamgourmet seems to be down.
I was hoping it'd be back up by now.

~Greg

Mark said:
Thanks Greg......do I assume that email is the same just
drop the "spam" part?
-----Original Message-----
When I did a sample program, my .Position started at 0. (that was in C#, but
I'd think it'd be the same ).

If you want to send your files I'd look at them.

~Greg
Mark said:
There are a few separate, non-related places on the form
that I fill datasets.

Yeah, the field does have spaces - - - didn't design the
db myself. The value for ".position" has always been - 1
so far, which I'm assuming meant there are no records,
hence the logic.

I can send you my source .vb file(s) to give a better
vision also.

Mark
-----Original Message-----
My first thought, are you filling the DataSet?

sqlDataAdapter1.Fill( dataSet11 )

You don't need to add the Binding to the Collection
because your first call
does that already.

NewBinding = txtTest.DataBindings.Add("Text",
dsIRHeaderMain,
"IRHeader.IR Start Date")

Does the column header "IR Start Date" really have
spaces in it?

If .Position = .Count - 1 Then
Beep()

I'd do .Position >= .Count - 1 just in case .Count is
zero.

~Greg

I'm faily new (< 6 months) with working with .Net so
if I
have designated the binding at design time, I tried a
stub test like the code below and it didn't show any
data. Is this incorrect because it jumps to the "Beep"
location again when I know it shouldn't and just update
itself.

Dim NewBinding As System.Windows.Forms.Binding

NewBinding = txtTest.DataBindings.Add ("Text",
dsIRHeaderMain, "IRHeader.IR Start Date")
'Gets error below that Databindings collection
exists already.
'Me.txtTest.DataBindings.Add(NewBinding)

With Me.BindingContext (Me.dsIRHeaderMain, "IRHeader")
If .Position = .Count - 1 Then
Beep()
Else
.Position += 1
UpdateDisplay()
End If
End With
-----Original Message-----
Make sure the DataSource you're binding to matches the
DataSource you are
using to access the BindingContext with... i.e

textBox1.DataBindings.Add( "Text", DataTable, "Col1");
this.BindingContext[ DataTable ]

~Greg

Hello all -

I'm really having a bizarre problem that I'm hoping
to
appeal to the experts on. Running .Net 2003,
framework
1.1.

All I'm trying to do is bind 40 fields on a VB.Net
windows form to an Access database. When I set up a
data
adapter (with the select command of everything in 1
table) and generate a dataset in design time, when
I "preview data", I can see the 2 rows that I want
to
return. Yet when I try to use my navigate
buttons "<"
and ">" on my form, it states there are zero rows in
the
table when I know there isn't.

Please pass along what I could be doing wrong.
This is
really a pain!

Thanks,
Mark


.



.


.
 
Back
Top