dimes1827 Posted March 21, 2007 Report Share Posted March 21, 2007 Hi to all, has anyone tried using the activeX for Datagrid and Adodc Control in LV 6.1 or 7.xx ?? (MSDataGridLib.IDataGrid and MSAdodcLib.IAdodc) im converting a VB6 & SQL code into labview SQL.. (e.g SQL = SQL & " WHERE tester = '" & LCase(Tester.Text) & "'" Adodc.ConnectionString = "Provider=MSDASQL.1;Password=password;Persist Security Info=True;User ID=postgres;Data Source=database1" Adodc.RecordSource = SQL Adodc.Refresh) but i got this problem of specifying the datasource in the datagrid at the design time. i usually cant edit the property browser at the design time. the msdn noted that in vb.. it's only in the design time that the datasource is set to.. not during runtime. this is the only problem that i cant solve this time.. i tried accessing the Datagrid.datasource property - i set it to Write then wired a Adodc.recordset.datasource property into it (with additional variant data conversion for the datasource type). but still the datagrid is not binded to the adodc control.. any help/comments/suggestions pls?? thanks.. Quote Link to comment
alukindo Posted March 22, 2007 Report Share Posted March 22, 2007 Hi Dimes1827: I have VB 6.0 and have made an example in LabVIEW to show data in an MS Data Grid from an ADO Data Control. I have attached a screen shot of the block diagram here. I can send you the LabVIEW Code, along with MS Access DB file, and ADODC.UDL file. This example worked OK. Note that I have used a *.UDL file to make a connection between ADO Data Control and MS Access DB. You could also use a DSN or Connection String I hope that this will help answer your question Anthony Lukindo Mezintel Inc. Quote Link to comment
alukindo Posted March 22, 2007 Report Share Posted March 22, 2007 Dimes1827: Just before I sent the code I added code to close the recordset. I later determined that the <Recordset Close> Method makes the data disappear from the grid. So I revised the code as shown here. The block diagram also has additional & corrected info on location and contents of ADODC.UDL File Anthony Quote Link to comment
dimes1827 Posted March 23, 2007 Author Report Share Posted March 23, 2007 QUOTE(alukindo @ Mar 21 2007, 04:51 PM) Dimes1827:Just before I sent the code I added code to close the recordset. I later determined that the <Recordset Close> Method makes the data disappear from the grid. So I revised the code as shown here. The block diagram also has additional & corrected info on location and contents of ADODC.UDL File Anthony thanks for making this possible.. this will be a great help. but im using the LabSQL vi's.. i'll try it there and make some modifications.. i'll let u know later in my progress.. thanks a lot alukindo! Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.