Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
odeh83
Starting Member
8 Posts |
Posted - 2006-04-19 : 03:52:47
|
| Guys, i searched the forum and i found similar threads but non-worked 4 me, My question is, how can i add the values in listbox1 to table "RPTPARAM" into a field named "SORTBY"! The field is varchar2 (2000) so it can accept many characters! The loop works fine but I don't know how to insert all the data in listbox1 to the SORTBY field...here is the code.........Dim a As IntegerIf ListBox1.Items.Count > 0 ThenFor a = 0 To ListBox1.Items.Count - 1StrSort = ("INSERT into RPTPARAM (SORTBY) values ('" & ListBox1.DataValueField & "')")NextEnd If |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-04-19 : 03:57:03
|
| Dim a As IntegerIf ListBox1.Items.Count > 0 ThenFor a = 0 To ListBox1.Items.Count - 1StrSort = "INSERT into RPTPARAM (SORTBY) values ('" & ListBox1.DataValueField & "')"Con.Execute(Strsort)NextEnd If where con is the connection objectMadhivananFailing to plan is Planning to fail |
 |
|
|
odeh83
Starting Member
8 Posts |
Posted - 2006-04-19 : 04:36:06
|
| thanx a lot madhivanan ;) |
 |
|
|
|
|
|