LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ADODC activeX control - Null Reference for Property node for Fields property of Recordset

Greetings all,
 
I'm having problems using some parts of the ADODC activeX control in a Labview ActiveX container. 
 
the top level properties seem to work fine (like the recordsource and connectionstring), however, I am getting runtime errors when I try to use the Fields property of the Recordset property of the ADODC reference.
 
When I run the program, a pop-up window appears with the following error message:
 
Error 97 occurred at Property Node
Possible reasons:
Labview: Null referene was passed in as input
 
Help?
 
P.S.  I realize there are alternative methods for doing this such as the database connectivity toolset, however, I would like to try to figure this out.
 
Thanks!
 
0 Kudos
Message 1 of 6
(2,874 Views)

Hi Zoe,

Did you put indicators on inputs to the ActiveX Container to see if any of them were Null?  I assume you are starting with a very small program.  Could you post a picture of it?

Have a good one.

Brian K.
0 Kudos
Message 2 of 6
(2,857 Views)
Hi Brian,
 
I don't have a website to post an image. Do you know of one I could post the image to?
 
I have 2 indicators which work on the top level properties, but nothing works below it.
 
I have an adodc activex control in a labview activex container.
In the block diagram, the activex control reference is passed to an open animation block,
which, in turn is wired to 2 property nodes with the 'recordsource' and 'connectionstring' properties respectively. Here is some ascii art of one of the many attempts I've made:
 
Adodc_Toby --- 'Open animation' --------- Property Node
                                                           |       Recordsource --- 'Indicator
                                                           |
                                                           ------  Property Node
                                                           |         ConnectionString --- indicator
                                                           |
                                                           -------Property Node
                                                                    Recordset ------- Property Node
                                                                                                Fields  
 
The error I described earlier occurs on the Recordset Property Node.
If I delete that node and the fields node, then the 2 indicators show valid information.
 
The connnection string will show on the front panel:
 
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\jasper\National Instruments\Work_related_Labview\labview.mdb;Persist Security Info=False
 
and the Recordsource indicator shows:
 
SELECT * from Jasper_DG535
 
I had entered these on the Front Panel control by right-clicking on the control and selecting ADODC properties
 
Coud you try to simulate this?
 
Thanks,
  Toby
0 Kudos
Message 3 of 6
(2,846 Views)

Hi Toby,

If you wan't you can attach a snipet of your code or a picture.  You can do this when you reply to a message and go to the attachment section of the post, and browse to the VI or image you want.  I think that would be the easiest way to see what you are trying to do.

Brian K.
0 Kudos
Message 4 of 6
(2,838 Views)
Hi Brian (or anyone),
 
Sorry for the delay getting back to you. Got super busy at work. Hope it's not too late to enlist your help.  Thanks, I somehow missed the 'attachment section' on your discussion group website.
 
In the attachment, I show the front panel, ADODC property page, Block Diagram, and the error message. When the error message appears, it highlites the offending 3 'blocks' on the Block diagram, which are entitled: Recordset, Recordset, and Fields.
 
 
Thank you!
   Toby
 
0 Kudos
Message 5 of 6
(2,799 Views)

Hi Toby,

Can you check to see if the reference is NULL going into the _recordset property nodes, just to make sure the error is correct?

Brian K.
0 Kudos
Message 6 of 6
(2,786 Views)