ODBC in Win95

ODBC in Win95

Post by Tony » Wed, 04 Mar 1998 04:00:00



Hi,
     I got a program, written in professional edition Visual Basic5, for

 accessing Btrieve files on Window95 platform. The data access via ODBC
 API is performed in the program by using SQL statements to pass data to

 and from the ODBC data source. I got a problem that the program can
 access the data, but when I try to delete, add, or update the database,

 there is an error as follows.
          Run-time error '-2147221494 (8004000a)':
          <Unable to delete row>[Pervasive Software][ODBC
 Interface]Invalid cursor state

     I had tried to use this program to access Access97 files also and
 the result is an error too.
         Run-time error '-2147221494 (8004000a)':
         <Unable to delete row>24[Microsoft][ODBC Microsoft Access 97
 Driver]Invalid cursor state.

 Any ideas to fix these problems? Please... Thanks in advance.
 Tony

 --------------------------------------------------------------------------------

 Some parts of the codes are provided here.
 ' to call odbc32.dll
 Declare Function SQLExecDirect Lib "odbc32.dll" (ByVal hStmt As Long,
 ByVal sqlString As String, ByVal sqlstrlen As Long) As Integer
 ----------------------
 Public Sub DelRow(frmTemp As Object)
     ' remove a row from the table
     Dim intResult As Integer
     Dim strSQL As String
     ' make statement
     strSQL = "DELETE * FROM " & strTable & " WHERE " & strKey & "='" &
 frmTemp.sqlField(0) & "'"
    ' make the call
     intResult = SQLExecDirect(hStmt, strSQL, Len(strSQL))'intResult =
-1
     If intResult <> sqlSuccess Then                      'sqlsuccess =
0
         sqlErrorMsg "Unable to delete row"
         intResult = SQLFreeStmt(hStmt, sqlClose)
     End If
     '
 End Sub

 
 
 

ODBC in Win95

Post by Andre-John Ma » Thu, 05 Mar 1998 04:00:00



> Hi,
>      I got a program, written in professional edition Visual Basic5, for

>  accessing Btrieve files on Window95 platform. The data access via ODBC
>  API is performed in the program by using SQL statements to pass data to

>  and from the ODBC data source. I got a problem that the program can
>  access the data, but when I try to delete, add, or update the database,

>  there is an error as follows.
>           Run-time error '-2147221494 (8004000a)':
>           <Unable to delete row>[Pervasive Software][ODBC
>  Interface]Invalid cursor state

>      I had tried to use this program to access Access97 files also and
>  the result is an error too.
>          Run-time error '-2147221494 (8004000a)':
>          <Unable to delete row>24[Microsoft][ODBC Microsoft Access 97
>  Driver]Invalid cursor state.

First, let me say that I am in the process of learning ODBC, so I am no
guru. One possibility is that you don't have permission to modify the
database and it is complaining that it can't make the modification that
you are trying to make.

AJ

 
 
 

ODBC in Win95

Post by Tony » Fri, 06 Mar 1998 04:00:00


I try the DELETE FROM syntax instead of DELETE * FROM, and the program
works fine. However, it is very very slow. I may consider VB 5 Enterprise
version.

Thank you for all answers and comments I got.

Tony

 
 
 

1. MS-WORD 6.0 WLL & ODBC DLL Add-Ins

Hi,

Has anyone had problems with the wbodbc.wll add in for Word 6.0 ?.

Firstly I had problems connecting to a ODBC DataSource (Borland Interbase),
although I have no problems getting to it with a Borland C++ prog.

MS gives you the source to wbodbc.wll with the Office Development Kit to
'customise' for various odbc drivers, but if I compile this, without changes,
under MSVC v1.5, then Word crashes with a GPF in the the wll when I attempt
to access it.

Do I need to compile this with v2.0 of MSVC ?, the makefile out of the box
failed under v1.5.

Thanks in Advance
Chris

----------------------------------------------------------

  Green Door Software Ltd   Compu$erve: 100242,1003
  P.O. Box 67-107, Mt Eden, URL:        http://softcopy.com/chris
  Auckland, New Zealand.    Phone/Fax:  +64 9 376 2792

  The Auckland Warriors Rugby League Home Page:
                           http://softcopy.com/chris/warriors.htm
----------------------------------------------------------

2. Patch or file to upda

3. ODBC problems under Win95

4. Getting a pane's frame rect?

5. ODBC & Win95?

6. Need BO XI R3 Developer+Admin

7. odbc win95 access drivers

8. A New Web Site

9. Access 2.0 ODBC driver problems in Win95/NT - Help!

10. C++, Visual FoxPro and ODBC, "ODBC Driver Does Not Support Dynasets"

11. ODBC: Setting Data Sources Without using ODBC Administrator

12. How to make Ins key work with edit control

13. Excalibur BBS for Windows: Plug-Ins