Insufficient base table information for updating or refreshing 
Author Message
 Insufficient base table information for updating or refreshing

Hi

    I get "Insufficient base table information for updating or refreshing"
when trying to run ADORecordset.Update
So... The file opens ok. I copy from one recordset to another.
Source= SQL Server - results and structure are almost the same as
destination
Destination=DBF (FoxPro 2.x table) - there are a few fields more in this
table comparing with source, but using the for loop I solved the problem,
replacing 1-1 field and "" for the fields that are not common.
    In the end I want to UPDATE the AddNew Record and the "Insufficient base
table information for updating or refreshing"
error is raised.... Just great.
    PLEEEEEASE HELP!!!!
Below the function:

Dim rez, intCount, recaff As Integer
    'SQL
    Dim rs As New ADODB.Recordset
    'DBF
    Dim rstmp As ADODB.Recordset
    Dim cn As ADODB.Connection
    Dim strSQL As String
    Dim arraPar(0) As Variant
    Dim arraVal(0) As Variant
    Dim fld


    arraVal(0) = KeyDoc
    rez = OpenStoredProc("usp_ContifGetFac", arraPar, arraVal, rs)
    If rs.State <> 0 Then
        Set cn = New ADODB.Connection
        Set rstmp = New ADODB.Recordset
        With cn
            .Provider = "MSDASQL.1;"
            .CursorLocation = adUseClient
            .ConnectionString = "DSN=Visual FoxPro Tables;UID=;SourceDB=" &
Path &
"SOFTEH\Gest\1\DBF\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=
Machine;Null=Yes;Deleted=No;"
            .Open
        End With

        ' Pozitii
        rstmp.Open "FF_P", cn, adOpenKeyset, adLockOptimistic,
adCmdTableDirect
        rstmp.AddNew
        rs.MoveFirst
        For fld = 0 To rs.Fields.Count - 1
            rstmp.Fields(rs.Fields(fld).name).Value = rs.Fields(fld).Value
            intCount = intCount + 1
        Next
        For fld = 0 To rstmp.Fields.Count - 1
            If rstmp.Fields(fld).Value = "" Then
                Debug.Print rstmp.Fields(fld).name
                Select Case rstmp.Fields(fld).Type
                    Case adInteger
                        rstmp.Fields(fld).Value = 0
                    Case adDouble
                        rstmp.Fields(fld).Value = 0
                    Case adNumeric
                        rstmp.Fields(fld).Value = 0
                    Case adDBDate
                        rstmp.Fields(fld).Value = Now()
                    Case Else
                        rstmp.Fields(fld).Value = ""
                End Select
            End If
        Next
'============================= ERROR ========================
        rstmp.Update

        rstmp.Close

        ' Antet

        Set rstmp = Nothing
        Set rs = rs.NextRecordset
        Set rstmp = New ADODB.Recordset
        rstmp.Open "FF_A", cn, adOpenDynamic, adLockOptimistic,
adCmdTableDirect
        rstmp.AddNew
        rs.MoveFirst
        For fld = 0 To rs.Fields.Count - 1
            rstmp.Fields(rs.Fields(fld).name).Value = rs.Fields(fld).Value
            intCount = intCount + 1
        Next
        Set rstmp = Nothing
        rstmp.Update
        rs.Close
        rstmp.Close

        Set cn = Nothing



Mon, 21 Feb 2005 19:45:21 GMT  
 Insufficient base table information for updating or refreshing
Hi,

Do you have primary key in that table? Did you include primary key field(s)
in your SELECT statement? To be able to update tables provider requires
primary key information. Without that information it could fail.

--
Val Mazur
Microsoft MVP


Quote:
> Hi

>     I get "Insufficient base table information for updating or refreshing"
> when trying to run ADORecordset.Update
> So... The file opens ok. I copy from one recordset to another.
> Source= SQL Server - results and structure are almost the same as
> destination
> Destination=DBF (FoxPro 2.x table) - there are a few fields more in this
> table comparing with source, but using the for loop I solved the problem,
> replacing 1-1 field and "" for the fields that are not common.
>     In the end I want to UPDATE the AddNew Record and the "Insufficient
base
> table information for updating or refreshing"
> error is raised.... Just great.
>     PLEEEEEASE HELP!!!!
> Below the function:

> Dim rez, intCount, recaff As Integer
>     'SQL
>     Dim rs As New ADODB.Recordset
>     'DBF
>     Dim rstmp As ADODB.Recordset
>     Dim cn As ADODB.Connection
>     Dim strSQL As String
>     Dim arraPar(0) As Variant
>     Dim arraVal(0) As Variant
>     Dim fld


>     arraVal(0) = KeyDoc
>     rez = OpenStoredProc("usp_ContifGetFac", arraPar, arraVal, rs)
>     If rs.State <> 0 Then
>         Set cn = New ADODB.Connection
>         Set rstmp = New ADODB.Recordset
>         With cn
>             .Provider = "MSDASQL.1;"
>             .CursorLocation = adUseClient
>             .ConnectionString = "DSN=Visual FoxPro Tables;UID=;SourceDB="
&
> Path &

"SOFTEH\Gest\1\DBF\;SourceType=DBF;Exclusive=No;BackgroundFetch=Yes;Collate=

- Show quoted text -

Quote:
> Machine;Null=Yes;Deleted=No;"
>             .Open
>         End With

>         ' Pozitii
>         rstmp.Open "FF_P", cn, adOpenKeyset, adLockOptimistic,
> adCmdTableDirect
>         rstmp.AddNew
>         rs.MoveFirst
>         For fld = 0 To rs.Fields.Count - 1
>             rstmp.Fields(rs.Fields(fld).name).Value = rs.Fields(fld).Value
>             intCount = intCount + 1
>         Next
>         For fld = 0 To rstmp.Fields.Count - 1
>             If rstmp.Fields(fld).Value = "" Then
>                 Debug.Print rstmp.Fields(fld).name
>                 Select Case rstmp.Fields(fld).Type
>                     Case adInteger
>                         rstmp.Fields(fld).Value = 0
>                     Case adDouble
>                         rstmp.Fields(fld).Value = 0
>                     Case adNumeric
>                         rstmp.Fields(fld).Value = 0
>                     Case adDBDate
>                         rstmp.Fields(fld).Value = Now()
>                     Case Else
>                         rstmp.Fields(fld).Value = ""
>                 End Select
>             End If
>         Next
> '============================= ERROR ========================
>         rstmp.Update

>         rstmp.Close

>         ' Antet

>         Set rstmp = Nothing
>         Set rs = rs.NextRecordset
>         Set rstmp = New ADODB.Recordset
>         rstmp.Open "FF_A", cn, adOpenDynamic, adLockOptimistic,
> adCmdTableDirect
>         rstmp.AddNew
>         rs.MoveFirst
>         For fld = 0 To rs.Fields.Count - 1
>             rstmp.Fields(rs.Fields(fld).name).Value = rs.Fields(fld).Value
>             intCount = intCount + 1
>         Next
>         Set rstmp = Nothing
>         rstmp.Update
>         rs.Close
>         rstmp.Close

>         Set cn = Nothing



Mon, 21 Feb 2005 20:57:48 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Insufficient base table information for updating or refreshing.

2. Help .....insufficient base table information for updating or refreshing

3. Insufficient base table information for updating or refreshing

4. Error: Insufficient base table information for updating or refreshing

5. Insufficient base table information for updating or refreshing

6. Insufficient base table information for updating or refreshing.

7. Error 2147467259 Insufficient base table information for updating or refreshing

8. XP installation : 2147467259 Insufficient base table information for updating or refreshing

9. Insufficient base table information for updating or refreshing

10. Insufficient base table information for updating or refreshing?

11. AdodcSave:-2147467259 - Insufficient base table information for updatig or refreshing

12. VB6 ADO Insufficient Base Table information for updating or refreshing error (Why?)

 

 
Powered by phpBB® Forum Software