Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

citadel

what is the procedure to access citadel database from C#. Throught adodb I receveived the message "ODBC driver does not support this function" on every simple sql statement.Same message received with OdbcConnection.
0 Kudos
Message 1 of 10
(5,507 Views)
I didn't find any C# examples for this, but you can check out some similar VB 6.0 examples that use ADO. You might need to change your SQL statements because of the way the citadel db works. Check out doc for info as well.

Hope this helps
Bilal Durrani
NI
Message 2 of 10
(5,467 Views)
Have you already set up the database as an ODBC Data Source? If not, you’ll want to check out Developer Zone Tutorial: Setting up a Citadel 4 Database as an ODBC Data Source for Lookout or LabVI...

Are you using Lookout or LabVIEW DSC?

If you are familiar with Visual Basic, you may find this example useful.

If none of this helps, let me know what NI hardware or software you are using in conjunction with your Citadel database.

Regards,

Eric M
Message 3 of 10
(5,466 Views)
this is the thing! In vb6 or excel or msquerry the data is retrieved very nicely, but in .NET I can't retreive any data except alarms (throught MSDE). I used different DataAdapters but I cannot fill any DataSet because I get ODBC driver does not support this opereation. I wonder if the driver is not installed correctly or there is some procedure that I doing wrong for accesing Citadel5 in .NET. Any wizards in .NET for accesing databases throws the same messange.
thanks
0 Kudos
Message 4 of 10
(5,461 Views)
I use DSC 7.1, with more than 7000 tags, hardware in a DIO 32 card (used as serial communication for aquiring the tags)
0 Kudos
Message 5 of 10
(5,460 Views)
finally I did it!!!
It must be done with OdbcConnection class and a DataReader. In c# I don't think that adodb works because method GetRows of a Recordset does not exist, and method Fill on OleDbDataAdapter throw that message.
It is not very fast on large data but it works!!!! 🙂
0 Kudos
Message 6 of 10
(5,421 Views)
Hi,

There is an issue with the current ODBC driver and ADO.NET. For some reason, ADO.NET expects our ODBC driver to implement an optional piece of ODBC functionality which is not required for accessing Citadel data. When ADO discovers that this functionality is not implemented, it immediately fails with the error message you are seeing.

For Visual Basic 7 users, I generally recommend using the old ActiveX implementation of ADO rather than ADO.NET to access Citadel data. This failure does not occur with traditional ADO, and traditional ADO is noticeably faster when accessing data with the current version of the ODBC driver. Unfortunately, I do not know enough about C# to tell you how to use traditional ADO, or if it is even possible.

This issue should be fixed with the next release of Citadel.

Sorry for the inconvenience,

J.D. Robertson
Software Engineer
National Instruments
Message 7 of 10
(5,358 Views)
In VB.7 with old activex ADO it works as fast as in c# with OdbcConnection class and a DataReader. But I have another question, why in asp the measurement studio UI graph are not applicable?
0 Kudos
Message 8 of 10
(5,353 Views)
I'm afraid I don't know the answer to that. You might want to start a new topic for that question.

J.D. Robertson
Software Engineer
National Instruments
Message 9 of 10
(5,341 Views)
If you are asking about why you cannot use the Measurement Studio .NET graph in an ASP.NET application, it's because these are Windows Forms controls, not web controls.

If you have the ActiveX Measurement Studio graph, check out this post for more information.

We are looking into having Measurement Studio web controls in the future. With your approval, I can get your contact information from the forums and get in touch with you when we have something available. Please make sure your profile information is updated.

Thanks
Bilal Durrani
NI
Message 10 of 10
(5,338 Views)