export statistica data to MS Access - Statistica Visual Basic - Statistica - Dell Community

export statistica data to MS Access

export statistica data to MS Access

This question is not answered

I have a bunch of raw data inside a Statistica workbook and wish to export it directly to a MS Access 2007 database. I know it's possible to do this indirectly by exporting to Excel and then import to Access. But is it possible to do a direct export to the database?

Thanks,

                 ~ Li

All Replies
  • You can save data as .CSV files and importing them into Access too.

    I have never tried this, but I know there is a "StatSoft OLE DB Provider for STATISTICA spreadsheets". Maybe you can open Access and create a database connection for the specific Statistica spreadsheet? Then you can just select the data and insert it into Access.

    Mindi

  • I spoke with StatSoft tech support, and they confirmed there's no direct exporting feature built into Statistica. But they indicated it's possible to write scripts to achieve a similar functionality.

                       ~ Li

  • Not just 100% sure exactly what you are looking for but here is a fairly
    generic procedure to write to an Access Database.

    Private Const m_cDBLocation As String = "C:\Stuff.mdb"
    Private Const m_cLogFile As String = "tblLogFile"

    Public Sub LogIn()
    Dim cnt As New ADODB.Connection
    Dim rst As New ADODB.Recordset

    On Error GoTo ErrorHandler
    'Open connection to the database
    cnt.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & m_cDBLocation & ";"

    rst.Open m_cLogFile, cnt, adOpenKeyset, adLockOptimistic,
    adCmdTableDirect
    rst.AddNew

    rst.Fields("User Name") = "Bob"
    rst.Fields("Logged") = "In"
    rst.Fields("Time") = Now()

    rst.Update
    ' Close ADO objects
    rst.Close
    cnt.Close
    Set rst = Nothing
    Set cnt = Nothing
    End If
    Exit Sub

    ErrorHandler:
    'Add error handling
    End Sub

    rahul

    www.propertywala.com/amrapali-zodiac-noida


  • rahul wrote

    Not just 100% sure exactly what you are looking for but here is a fairly
    generic procedure to write to an Access Database.

    Private Const m_cDBLocation As String = "C:\Stuff.mdb"
    Private Const m_cLogFile As String = "tblLogFile"

    Public Sub LogIn()
    Dim cnt As New ADODB.Connection
    Dim rst As New ADODB.Recordset

    On Error GoTo ErrorHandler
    'Open connection to the database
    cnt.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
    "Data Source=" & m_cDBLocation & ";"

    rst.Open m_cLogFile, cnt, adOpenKeyset, adLockOptimistic,
    adCmdTableDirect
    rst.AddNew

    rst.Fields("User Name") = "Bob"
    rst.Fields("Logged") = "In"
    rst.Fields("Time") = Now()

    rst.Update
    ' Close ADO objects
    rst.Close
    cnt.Close
    Set rst = Nothing
    Set cnt = Nothing
    End If
    Exit Sub

    ErrorHandler:
    'Add error handling
    End Sub

    rahul


    thanks, this helped the problem a lot. I still don't think the problem is resolved, but this is a good step towards it.

    Rolex Replica Watches Replica Watches Swiss Replica Watches Swiss Cartier Replica Watches Hot Replica Handbags