DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to save data channels data in Diadem View into Oracle database

Currently, I can pull data from database into data channels in Diadem 9. After modifications, I'd like to save data back into database.

Thanks in advance for any help you can give me.

Paige
0 Kudos
Message 1 of 6
(3,612 Views)
Hi,
If you are working with the DIAdem SQL_.... commands you can use the command: SQL_INSERT, which inserts new lines in a database table

Call SQL_INSERT(SQL_TABLE, SQL_COLLIST, SQL_VALUES)
Parameters
SQL_TABLE Name of the table
SQL_COLLIST Name of the result column
SQL_VALUES Values (separated by commas)

Note: The command generates a SQL string with the following form: INSERT INTO () VALUES()

Or you can use the Microsoft ADO interface. Further information to this topic you find attached and in some internet usergroups.

I hope this will help you.

Walter Rick
0 Kudos
Message 2 of 6
(3,612 Views)
Hi Rick,
Thank you so much for the prompt reply! I don't have ado.net and it looks like an interface would have to to created to take the data from Diadem and save it in the database. I've attached a screenprint of data channels for you to see. So if I need to save all the properties info of "Y-COORD" channel and "Paige1" channels, how would I do this since I can't use the ado example files :o(.

Thank you!

Paige
0 Kudos
Message 3 of 6
(3,612 Views)
Sql_insert works great! I still need a little help on how to read data channels, with or without properties in them, and new ones that the user creates like "Paige1" (in attached file). Especially if there are many, how do you know which channel with corresponding properties is being saved to the database?

Thank you so much! This forum, and you, are awesome!
0 Kudos
Message 4 of 6
(3,612 Views)
Hi Paige,

I don't know whether I understand your question correct, but you must specify which values you would like to store into a DB table. If the problem is how to find a channel which contains a own specified property than must search for it. For this you can use a function like this:

msgbox IsProperty("EXAMPLE/Zeit", "Test")

function IsProperty(sChnGroupChn, sChnProp)
Dim vTest
on error resume next
vTest = ChnPropGet(CNo(sChnGroupChn), sChnProp)
if err.Number <> 0 then
IsProperty = "No property: " & Err.Description
else
IsProperty = "Found property: " & vTest
end if
end function

I hope this will help you.

Greetings

Walter Rick
0 Kudos
Message 5 of 6
(3,612 Views)
Thanks for your help Rick!
Paige
0 Kudos
Message 6 of 6
(3,612 Views)