Jump to content

DATAGrid datasource


Recommended Posts

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..

Link to comment

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.

Link to comment

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

Link to comment

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.. :D

i'll let u know later in my progress..

thanks a lot alukindo!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.