Results 1 to 5 of 5

Thread: export to dbf

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    export to dbf

    I have listview with columnheader and listitem.. I want export content in the listview to dbf.. How I can start this?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: export to dbf

    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.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: export to dbf

    Hi Hack,

    How to start with Insert into? I would like to start it with sample before I can go further?

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: export to dbf

    Example:
    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
    Something like that.

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2007
    Location
    Malaysia
    Posts
    1,370

    Re: export to dbf

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width