Hello Community,
I currently has a cluster of example code that I would like to combine. My current challenge is inserting a string from my GPIB bus into my SQL Database field.
My working code looks something like this:
I would like to insert the 'vpp1' string into my ch1 in my SQL Server. I have tried this (I have left some of the sql dbase code out):
I am basing my code from Database: How to Save Data to a Database Using SQL Client - YouTube and the National Instrument 488.2 libraries.
I hope I didn't leave out too much code, I didn't want to make my post too cluttered.
Thanks for any help.
I currently has a cluster of example code that I would like to combine. My current challenge is inserting a string from my GPIB bus into my SQL Database field.
My working code looks something like this:
VB.NET:
Dim vpp1 As String
vpp1 = GpibDevice.ReadString()
MsgBox("Current Voltage is :" & vpp1)
I would like to insert the 'vpp1' string into my ch1 in my SQL Server. I have tried this (I have left some of the sql dbase code out):
VB.NET:
Connection.Open()
Dim newRecord As DataRow = table.NewRow()
newRecord("ch1") = vpp1
table.Rows.Add(newrecord)
Dim COMMAND As New SqlCommandBuilder(usersDataAdapter)
usersDataAdapter.Update(channel1, "waveforms")
channel1.Dispose()
Connection.Close()
I am basing my code from Database: How to Save Data to a Database Using SQL Client - YouTube and the National Instrument 488.2 libraries.
I hope I didn't leave out too much code, I didn't want to make my post too cluttered.
Thanks for any help.