Author Topic: Storing Info  (Read 1508 times)

Jesse

  • Jr. Member
  • **
  • Posts: 50
    • View Profile
Storing Info
« on: October 23, 2013, 10:28:50 AM »
Hey Archie, I have a database built in Microsoft sql and I have linked the table to my data-source, and so on etc. But here is my question I have a combo box with items added from the dictionary that sends its value to my clx and I would like to store what the last item was in there when the user clicks save, do u possibly know the code to say save combo box selected item in this row and column, I've tried a few things I've found researching databases but I can't get any to work.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5269
    • View Profile
    • AdvancedHMI
Re: Storing Info
« Reply #1 on: October 23, 2013, 10:51:07 AM »
The preferred method is to use Entity Framework for database interaction. But here is a code sample that shows how to use your data source with ADO.NET

Code: [Select]
    Dim MyTableAdapterVariable As New MyDataSetTableAdapters.MyTableTableAdapter
    Dim MyTableVariable As New MyDataSet.MyTableDataTable

    Dim NewTableRow As MyDataSet.MyTableRow
    NewTableRow = MyTableVariable.NewRow

   NewTableRow.Field1="abc"

   MyTableVarible.AddRow(NewTableRow)
   MyTableAdapterVarible.Update(MyTableVariable)

You will have to change things to match your names, but let intellisense help you with that.

Alice707

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: Storing Info
« Reply #2 on: November 02, 2013, 07:37:56 AM »
This way I can write the ASP application to pull its data from SQL instead of the comm drivers and will achieve the same goal.
mens leather biker jacket mens leather biker jacket
ccnp braindumps ccnp braindumps
pmp pmp
jacketsvision http://jacketsvision.com/