I have listview with columnheader and listitem.. I want export content in the listview to dbf.. How I can start this?
Printable View
I have listview with columnheader and listitem.. I want export content in the listview to dbf.. How I can start this?
I know you know how to iterate through a ListView, so just put an INSERT INTO query in the loop that will write your items back to your database.
Hi Hack,
How to start with Insert into? I would like to start it with sample before I can go further?
Example:Something like that.Code:Dim i As Long
Dim sSQL As String
dim itmItem As ListItem
For i = 1 To ListView1.ListItems.Count
sSQL = "INSERT INTO tablename (field1, field2) "
sSQL = sSQL & "VALUES ('" & ListView1.ListItems.Text & "', "
sSQL = sSQL & "' " & itmItem.Subitems(1) & "')"
connobject.Execute sSQL
Next
What is this connobject ? How to get connection string?
Hmm I want to export to dbf files like this Soil.dbf which is standalone tables. Stored permenently in local computer as files.