Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

table corrupted

2 posts in FoxPro Last posting was on 2008-01-29 16:04:18.0Z
Liviu Pasculescu Posted on 2008-01-29 07:27:36.0Z
From: "Liviu Pasculescu" <liviu.p@xnet.ro>
Newsgroups: advantage.foxpro
Subject: table corrupted
Date: Tue, 29 Jan 2008 09:27:36 +0200
Lines: 56
Organization: foxinfo
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 81.180.206.13
Message-ID: <479ecf54@solutions.advantagedatabase.com>
X-Trace: 29 Jan 2008 00:01:40 -0700, 81.180.206.13
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!81.180.206.13
Xref: solutions.advantagedatabase.com Advantage.FoxPro:249
Article PK: 1109602

I used following sequence program ,(VFP9):
CLOSE DATABASES

CLEAR

SET TALK OFF

M1=SQLCONNECT('adsn','adssys','adsys')

IF M1=1

m3=SQLEXEC(m1,"SET TRANSACTION AUTOCOMMIT_ON")

IF M3=1

FOR I=1 TO 10000

m2=SQLEXEC(m1,"insert into manopera (nr_crt) values
("+ALLTRIM(STR(i))+")")

@ 5,10 SAY I

ENDFOR

ENDIF

ENDIF

SQLDISCONNECT(m1)

SET TALK ON

CLOSE DATABASES

*************************************************

MANOPERA is a FOXPRO CDX table in a data dictionary -> liviu.add,NR_CRT is a
numeric 10,0 field in MANOPERA.

Computer is pentium IV,512k RAM,XP SP2,ADS9 run as service.

When counter i=200,reset my computer.

After rebooting,appear message:

Table 'D:\SYBASE\DATA\MANOPERA.dbf' has become corrupted.

What can i do to protect tables against corruption in this case ?



Thanks,


Mark Wilkins Posted on 2008-01-29 16:04:18.0Z
From: "Mark Wilkins" <mark@no.email>
Newsgroups: advantage.foxpro
References: <479ecf54@solutions.advantagedatabase.com>
Subject: Re: table corrupted
Date: Tue, 29 Jan 2008 09:04:18 -0700
Lines: 48
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: 10.24.38.228
Message-ID: <479f4d37@solutions.advantagedatabase.com>
X-Trace: 29 Jan 2008 08:58:47 -0700, 10.24.38.228
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!10.24.38.228
Xref: solutions.advantagedatabase.com Advantage.FoxPro:251
Article PK: 1109605

Hi,

There are a couple of things that you can check. Make sure that the DSN is
actually set to use the Advantage service. The option in the ODBC setup
utility is "Remote Server (ADS)". Also, make sure that Advantage is started
up when restarting the machine. If there was an active transaction,
Advantage will attempt to rollback or commit the transaction as appropriate
when the server is started. Note that Advantage Local Server does not use
transactions. You should also open the table first with Advantage after
restarting the server. It is possible that the record count that is stored
in the table header might have been out of sync with the actual number of
records in the table. If that is the case, Advantage will correct it when
you open the table. VFP will report the table as corrupted and will not
open it.

And another thing to note is that if you are looking for the highest
stability, it may make sense to run Advantage Database Server on a
physically different server with a UPS. If the client machine crashes or is
turned off, it will not affect the physical integrity of the tables.

Mark Wilkins
Advantage R&D

"Liviu Pasculescu" <liviu.p@xnet.ro> wrote in message
news:479ecf54@solutions.advantagedatabase.com...
>I used following sequence program ,(VFP9):
> CLOSE DATABASES
>
> CLEAR
>
> SET TALK OFF
>
> M1=SQLCONNECT('adsn','adssys','adsys')
>
> IF M1=1
>
> m3=SQLEXEC(m1,"SET TRANSACTION AUTOCOMMIT_ON")
>
> IF M3=1
>
> FOR I=1 TO 10000
>
> m2=SQLEXEC(m1,"insert into manopera (nr_crt) values
> ("+ALLTRIM(STR(i))+")")
>