Brad,
Checking it, I did not see a simple error that can be the reason.
This error can be everywhere in your code, the earliest real execution is
the fill.
When you do this you will probably get more information.
Try
dataAdapter2.Fill(DS2, "Operations") 'Fill the Dataset with
Catch ex as exception
messagebox.show(ex.tostring)
End try
I do not know that firebird dataadatapter, maybe there are more errors to
catch.
And because this is a not standard adapter, command etc. I advice you to ask
this question when this will not give the solution as well in the newsgroup
microsoft.public.dotnet.framework.adonet
There you have more change for people used to non standard database
providers.
I hope this helps anyway something
Cor
"Brad" <(E-Mail Removed)>
> Receive the following error when stepping into the FILL (see last line).
> Being a newbie I cannot see anything obvious.
>
> Error message:
> An unhandled exception of type 'System.NullReferenceException' occurred in
> system.data.dll
> Additional information: Object reference not set to an instance of an
> object.
>
>
> Code:
> Function JobConsol()
>
> MsgBox(selectedJobNo, MsgBoxStyle.DefaultButton2, "Starting the JOB
> CONSOL function")
>
> 'Connection string
> myConnectionString2 = "Database=c:\Program Files\Ezijobz
> SME\Database\Demo\EJDB.FDB;User=SYSDBA;
> Password=masterkey;Dialect=3;Server=localhost;Pooling=False"
> myConnection2 = New FbConnection(myConnectionString2)
> myConnection2.Open()
>
> myTxn2 = myConnection2.BeginTransaction()
>
> Dim ConsolCmd As String ' The SQL command for
> OPERATIONS
> Dim dataAdapter2 As FbDataAdapter ' The FB Data Adapter
> Dim DS2 As New DataSet ' The dataset
> dataAdapter2 = New FbDataAdapter ' Set the data adapter
>
> 'Load dataset with OPERATIONS records where @JOBNO
> ConsolCmd = "SELECT jobno, squences, opername, uniid FROM
> operations
> WHERE jobno = @JOBNO ORDER BY jobno"
> mycommand2 = New FbCommand(ConsolCmd, myConnection2, myTxn2) 'Set
> the SQL
> mycommand2.Parameters.Add("@JOBNO", FbDbType.Char)
> mycommand2.Parameters("@JOBNO").Value = selectedJobNo
> dataAdapter2.SelectCommand = mycommand2 'Set the Data Adapter
> dataAdapter2.Fill(DS2, "Operations") 'Fill the Dataset with
> OPERATIONS records
>
> --
> Brad
> Sydney, Australia
|