473,788 Members | 2,811 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Additional information: Object reference not set to an instance of

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.NullRef erenceException ' occurred in
system.data.dll
Additional information: Object reference not set to an instance of an object.
Code:
Function JobConsol()

MsgBox(selected JobNo, MsgBoxStyle.Def aultButton2, "Starting the JOB
CONSOL function")

'Connection string
myConnectionStr ing2 = "Database=c:\Pr ogram Files\Ezijobz
SME\Database\De mo\EJDB.FDB;Use r=SYSDBA;
Password=master key;Dialect=3;S erver=localhost ;Pooling=False"
myConnection2 = New FbConnection(my ConnectionStrin g2)
myConnection2.O pen()

myTxn2 = myConnection2.B eginTransaction ()

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(Conso lCmd, myConnection2, myTxn2) 'Set
the SQL
mycommand2.Para meters.Add("@JO BNO", FbDbType.Char)
mycommand2.Para meters("@JOBNO" ).Value = selectedJobNo
dataAdapter2.Se lectCommand = mycommand2 'Set the Data Adapter
dataAdapter2.Fi ll(DS2, "Operations ") 'Fill the Dataset with
OPERATIONS records

--
Brad
Sydney, Australia
Nov 21 '05 #1
2 1976
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.Fi ll(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.publi c.dotnet.framew ork.adonet

There you have more change for people used to non standard database
providers.

I hope this helps anyway something

Cor

"Brad" <Br**@discussio ns.microsoft.co m>
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.NullRef erenceException ' occurred in
system.data.dll
Additional information: Object reference not set to an instance of an
object.
Code:
Function JobConsol()

MsgBox(selected JobNo, MsgBoxStyle.Def aultButton2, "Starting the JOB
CONSOL function")

'Connection string
myConnectionStr ing2 = "Database=c:\Pr ogram Files\Ezijobz
SME\Database\De mo\EJDB.FDB;Use r=SYSDBA;
Password=master key;Dialect=3;S erver=localhost ;Pooling=False"
myConnection2 = New FbConnection(my ConnectionStrin g2)
myConnection2.O pen()

myTxn2 = myConnection2.B eginTransaction ()

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(Conso lCmd, myConnection2, myTxn2) 'Set
the SQL
mycommand2.Para meters.Add("@JO BNO", FbDbType.Char)
mycommand2.Para meters("@JOBNO" ).Value = selectedJobNo
dataAdapter2.Se lectCommand = mycommand2 'Set the Data Adapter
dataAdapter2.Fi ll(DS2, "Operations ") 'Fill the Dataset with
OPERATIONS records

--
Brad
Sydney, Australia

Nov 21 '05 #2
"Brad" <Br**@discussio ns.microsoft.co m> schrieb:
Receive the following error when stepping into the FILL (see last line).

If you don't get an answer here, give the folks in
microsoft.publi c.dotnet.framew ork.adonet or a similar group that is related
to database questions a try.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3

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

Similar topics

4
5973
by: michael walser | last post by:
I get this message in "Spaltenbreite definieren" => Definition for Columns Width An unhandled exception of type 'System.NullReferenceException' occurred in WindowsApplication1.exe Additional information: Object reference not set to an instance of an object. Please help me.
6
3135
by: Christopher Young | last post by:
I have several user controls on a page and I am trying to get information out of them. The postback is being caused on the aspx page and not in the user control. I have tried using a property but I keep getting a message that the object is not referenced. What I am trying to do is be information from text boxes and insert them into a new row in a dataset. The application has several tabs of information. I have a button set up so they...
4
1404
by: Supra | last post by:
I am doing irc chat similar to mirc chat if i connected to irc.webamster.com i had no problem. but if connected to eu.undernet.org. i got error....somthing bug me! O:-) 'February 2004 'An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll 'Additional information: Object reference not set to an instance of an object.
1
1270
by: Supra | last post by:
'An unhandled exception of type 'System.NullReferenceException' occurred in system.windows.forms.dll 'Additional information: Object reference not set to an instance of an object. in module: Dim nrtb As New RichTextBox Sub DisplayMessage(ByVal rtb As RichTextBox, ByVal sText As String, Optional ByVal Colour As String = "") rtb.SelectionStart = rtb.Text.Length ' rtb.doColor(rtb, DirectCast(sText, String))
12
5556
by: Andrew Poulos | last post by:
With the following code I can't understand why this.num keeps incrementing each time I create a new instance of Foo. For each instance I'm expecting this.num to alert as 1 but keeps incrementing. Foo = function(type) { this.num = 0; this.type = type this.trigger(); } Foo.prototype.trigger = function() {
6
2481
by: Shailen Sukul | last post by:
Observed a weird behaviour with object references. See code listing below: using System; using System.Collections.Generic; using System.Text; namespace PointerExceptionTest { /*
2
2658
by: Ralph | last post by:
Hi I don't understand why it's not working: function schedule(imTop){ this.tdImagesTop = imTop; } schedule.prototype.selectEl = function() { alert(this.tdImagesTop);
12
11111
by: raylopez99 | last post by:
Keywords: scope resolution, passing classes between parent and child forms, parameter constructor method, normal constructor, default constructor, forward reference, sharing classes between forms. Here is a newbie mistake that I found myself doing (as a newbie), and that even a master programmer, the guru of this forum, Jon Skeet, missed! (He knows this I'm sure, but just didn't think this was my problem; LOL, I am needling him) If...
1
6387
by: jadeite100 | last post by:
Hi All: I installed oracle report server 10.1.2.02 I tried the following url and it display the page properly that ask Test run Job: http://xxx/reports/rwwebservice?operation=runJob When I tried the url: http://xxx/reports/rwservlet/showJobs?server=rep_xxx_oracleas3 It is suppose to redirect me to an url to login. It did the first time. I was able to login using the id:orcladmin.
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10364
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.