Home All Groups Group Topic Archive Search About
Author
28 Mar 2005 8:33 PM
TS
From my windows form, I configured a Data Adapter and generated a dataset to
load data from a SQL database table. Then I used a code to fill the dataset.
The code returns the error message: "An unhandled exception of type
'System.Data.SqlClient.SqlException' occurred in system.data.dll
Additional information: System error."

The code I used is the following. What am i doing wrong?

Dim IntakeBindingManager As BindingManagerBase
        SqlDataAdapter1.Fill(DS_SSCIntake1)
        IntakeBindingManager = Me.BindingContext(DS_SSCIntake1, "qmf_cint")

Thanks

--
TS

Author
29 Mar 2005 9:34 AM
Cor Ligthert
TS

Can you try this,

dim IntakeBindingManager As CurrencyManager

>        SqlDataAdapter1.Fill(DS_SSCIntake1)
>        IntakeBindingManager = Me.BindingContext(DS_SSCIntake1, "qmf_cint")

IntakeBindingManager = DirectCast(BindingContext(DS_SSCIntake1, "qmf_cint"),
CurrencyManager)

You cannot use (normally) base classes directly.

I hope this helps,

Cor
Author
29 Mar 2005 8:15 PM
TS
Thanks for your reply. I'm still getting the same error message. I used the
syntax you sent me:
        Dim IntakeBindingManager As CurrencyManager
        SqlDataAdapter1.Fill(DS_SSCIntake1)
IntakeBindingManager = DirectCast(BindingContext(DS_SSCIntake1, "qmf_cint"),
CurrencyManager).

Please advise.


Show quoteHide quote
"Cor Ligthert" wrote:

> TS
>
> Can you try this,
>
> dim IntakeBindingManager As CurrencyManager
>
> >        SqlDataAdapter1.Fill(DS_SSCIntake1)
> >        IntakeBindingManager = Me.BindingContext(DS_SSCIntake1, "qmf_cint")
>
> IntakeBindingManager = DirectCast(BindingContext(DS_SSCIntake1, "qmf_cint"),
> CurrencyManager)
>
> You cannot use (normally) base classes directly.
>
> I hope this helps,
>
> Cor
>
>
>