Abrir un DBF de visual fox

Abrir un DBF de visual fox

Postby renemontano » Thu Apr 06, 2006 7:23 pm

Hola,

Tengo que entrar a un dbf de un sistema que usa Visuafox. Anteriormente a ese sistema ( es comercial ) entraba sin problemas a sus dbf y actualizaba lo que tenia que actualizar.

Pero ahorta cada vez que quiero entrar a un DBF me marca corrupcion. Baje el odbc de VFP y puedo entrar por excell despues de hacer algunos pasos.

Pero al tratar de entrar con FW me marca errores la conexcion. Alguien sabe como hacerlo ? o algun otro metodo ?

Gracias

.p.d.

me falto agregar lo siguiente:

si me puedo conectar a la bd por odbc:

cuando hago esta sentencia :

function cargaSQL()

public oRdd:= Trddodbc():New("adm")
public oODBC:= oRdd:oOdbc


If oOdbc:lSuccess
MSGINFO("Sistema inicializado correctamente")

else

MSGSTOP ("El sistema no pudo inicializarse, cerrando aplicacion...")
oOdbc:showerrorlist()
oRDD:OOdbc:end()
quit

Endif

return(.t.)
( ADM ES EL NOMBRE DEL ORIGNEN DE DATOS DE VFP )

ME APARECE QUE EL SISTEMA ESTA BIEN.

PERO AL QUERER DARLE UN BROWSE A LA BD HACEINDO ESTA SENTENCIA :

cquery:="select * from MGW10005" ( MGW10005 ES EL NOMBRE DEL ARCHIVO DBF)

USE (cQUERY) VIA "ODBC" NEW ALIAS "SISTEMA"

if oRdd:oOdbc:IsError()
oRdd:oOdbc:ShowErrorList()
oRdd:oOdbc:aErrors := {}
DbCloseArea()
return nil
endif

ALLI ES DONDE TRUENA CON EL SIG ERROR:

pplication
===========
Path and name: C:\FW20\TAPIA\MIGUEL\precios.exe
Size: 963,712 bytes
Max files handles permited: ( SetHandleCount() ) 255
Error ocurred at: 06/04/2006, 12:29:02
Error description: Error FWERROR/0/0 [Microsoft][ODBC Visual FoxPro Driver]Driver not capable: SQLSetStmt(SQL_CONCUR_LOCK) on AllocStatement() Method

Stack Calls
===========
Called from LOCKERRHAN(0)
Called from (b)INITHANDL$(0)
Called from TODBC:GENRTERROR(0)
Called from TODBC:NEWERROR(0)
Called from TODBC:STMTERROR(0)
Called from (b)TDBODBC(0)
Called from TDBODBC:ALLOCSTATE(0)
Called from TDBODBC:EXECUTE(0)
Called from TDBODBC:NEW(0)
Called from TRDDODBC:OPEN(0)
Called from OSEND(0)
Called from RDDEVENT(0)
Called from DBUSEAREA(0)
Called from BRW2CLIENT(90)
Called from (b)BUILDMENU(106)
Called from TMENU:COMMAND(0)
Called from TWINDOW:COMMAND(886)
Called from TWINDOW:HANDLEEVEN(0)
Called from WINRUN(0)
Called from TWINDOW:ACTIVATE(835)
Called from MAIN(69)

System
======
CPU type: 486
Hardware memory: 16128 (15 megas)

Free System resources: % 90
GDI resources: % 90
User resources: % 90

Windows and MsDos versions: 3.95, 5. 0
Windows total applications running: 2
1 C:\WINDOWS\SYSTEM32\USER.EXE
2 MSOFFICE.EXE
3 explorer.exe
4 C:\FW20\TAPIA\MIGUEL\precios.exe
5 med.exe
6 C:\WINDOWS\SYSTEM32\WOWEXEC.EXE
7 C:\WINDOWS\SYSTEM32\MMSYSTEM.DLL

Variables in use
================
Procedure Type Value
==========================
LOCKERRHAN
Param 1: O Class: ERROR
Param 2: B { || ... } CodeBlock
(b)INITHANDL$
Param 1: O Class: ERROR
TODBC:GENRTERROR
Param 1: C "SQLSetStmt(SQL_CONCUR_LOCK) on AllocStatement() Method"
Local 1: O Class: TODBC
Local 2: O Class: ERROR
TODBC:NEWERROR
Param 1: C "[Microsoft][ODBC Visual FoxPro Driver]Driver not capable"
Param 2: N 0
Param 3: C "S1C00 "
Param 4: C "SQLSetStmt(SQL_CONCUR_LOCK) on AllocStatement() Method"
Param 5: L .T.
Local 1: O Class: TODBC
Local 2: N 1
TODBC:STMTERROR
Param 1: N 46472608
Param 2: C "SQLSetStmt(SQL_CONCUR_LOCK) on AllocStatement() Method"
Param 3: L .T.
Local 1: O Class: TODBC
Local 2: C "S1C00 "
Local 3: N 0
Local 4: C "[Microsoft][ODBC Visual FoxPro Driver]Driver not capable"
Local 5: N 0
(b)TDBODBC
Param 1: O Class: TDBODBC
Param 2: N 46472608
Param 3: C "SQLSetStmt(SQL_CONCUR_LOCK) on AllocStatement() Method"
Local 1: U
Local 2: U
Local 3: O Class: TDBODBC
TDBODBC:ALLOCSTATE
Local 1: O Class: TDBODBC
Local 2: N 46472608
Local 3: N -1
TDBODBC:EXECUTE
Param 1: C "select * from MGW10005"
Local 1: O Class: TDBODBC
Local 2: N -1
TDBODBC:NEW
Param 1: C "select * from MGW10005"
Param 2: O Class: TODBC
Param 3: N 1
Param 4: C "SISTEMA"
Param 5: L .F.
Param 6: L .F.
Local 1: O Class: TDBODBC
Local 2: U
TRDDODBC:OPEN
Param 1: N 376399214
Param 2: N 1
Param 3: C "select * from MGW10005"
Param 4: C "SISTEMA"
Param 5: L .F.
Param 6: L .F.
Param 7: O Class: TRDDODBC
Param 8: U
Param 9: U
Param 10: U
Param 11: U
OSEND
Param 1: O Class: TRDDODBC
Param 2: C "OPEN"
Param 3: N 376399214
Param 4: N 1
Param 5: C "select * from MGW10005"
Param 6: C "SISTEMA"
Param 7: L .F.
Param 8: L .F.
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
RDDEVENT
Param 1: C "OPEN"
Param 2: N 376399214
Param 3: N 1
Param 4: C "select * from MGW10005"
Param 5: C "SISTEMA"
Param 6: L .F.
Param 7: L .F.
Local 1: U
Local 2: U
Local 3: U
Local 4: U
Local 5: U
DBUSEAREA
Param 1: L .T.
Param 2: C "ODBC"
Param 3: C "select * from MGW10005"
Param 4: C "SISTEMA"
Param 5: U
Param 6: L .F.
BRW2CLIENT
Local 1: U
Local 2: O Class: TDIALOG
Local 3: U
Local 4: C " "
Local 5: C "select * from MGW10005"
(b)BUILDMENU
Param 1: O Class: TMENUITEM
TMENU:COMMAND
Param 1: N 20006
Local 1: O Class: TMENU
Local 2: O Class: TMENUITEM
TWINDOW:COMMAND
Param 1: N 20006
Param 2: N 0
Local 1: O Class: TWINDOW
Local 2: N 0
Local 3: N 20006
Local 4: N 0
TWINDOW:HANDLEEVEN
Param 1: N 273
Param 2: N 20006
Param 3: N 0
WINRUN
Param 1: N 622
TWINDOW:ACTIVATE
Param 1: C "MAXIMIZED"
Param 2: U
Param 3: U
Param 4: U
Param 5: U
Param 6: U
Param 7: U
Param 8: U
Param 9: U
Param 10: U
Param 11: U
Param 12: U
Param 13: U
Param 14: U
Param 15: U
Param 16: U
Param 17: B { || ... } CodeBlock
Param 18: U
Param 19: U
Local 1: O Class: TWINDOW
Local 2: U
Local 3: U
MAIN
Local 1: O Class: TBRUSH
Local 2: O Class: TICON
Local 3: U
Local 4: O Class: TBAR
Local 5: O Class: TBTNBMP
Local 6: O Class: TFONT

Linked RDDs
===========
DBFNTX
_DBFCDX
DBFCDX
DBF
ODBC

DataBases in use
================

Classes in use:
===============
1 TRDD
2 TFONT
3 TBRUSH
4 TWINDOW
5 TCONTROL
6 TICON
7 TMENU
8 TMENUITEM
9 TRDDODBC
10 TODBC
11 TDIALOG
12 TBAR
13 TRECT
14 TBTNBMP
15 TMSGBAR
16 TMSGITEM
17 TTIMER
18 TDBODBC
19 ERROR

Memory Analysis
===============
Static memory:
data segment: 64k
Initial size: 42528 bytes (SYMP=656, Stack=17500, Heap=2060)
Clipper Stack: 21285 bytes
123 Static variables: 1722 bytes

Dynamic memory consume:
Actual Value: 348462 bytes
Highest Value: 421166 bytes



GRACIAS POR SU AYUDA
renemontano
 
Posts: 8
Joined: Thu Nov 17, 2005 9:50 pm
Location: Hermosillo, Sonora, Mexico

Postby Antonio Linares » Fri Apr 07, 2006 9:25 am

Rene,

Puedes publicar aqui la DBF para que la probemos con Harbour ?

Usa www.hyperupload.com para alojarla y publica aqui el link de descarga. Gracias.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby renemontano » Fri Apr 07, 2006 7:07 pm

http://hyperupload.com/download/013e62c040/mgw.zip.html

gracias Antonio,

Aqui la tienes. No estoy seguro que sea de VFP pero al parecer asi es. Tambien me comentaron que posiblemente el dbf le cambiaron el primer byte como seguridad pero no sé como hacer ese movimiento... espero me puedas ayudar gracias
renemontano
 
Posts: 8
Joined: Thu Nov 17, 2005 9:50 pm
Location: Hermosillo, Sonora, Mexico


Return to FiveWin para CA-Clipper

Who is online

Users browsing this forum: No registered users and 1 guest