Command Pack from VB: Why does it fail?

06/09/2004 - 07:56 por Tomás Liendo | Informe spam
Hello I need to execute the command PACK (that erases all the marked files
for elimination of a FoxPro table)
from an application written in Visual Basic. This makes it in the following
way (just as me
somebody indicated in this same forum)

'It reopens connection-
cn_fox.ConnectionString = "Provider=MSDASQL.1;Persist Security
Info=False;Data Source=Visual FoxPro Database;Extended Properties=DSN=Visual
FoxPro Database;UID=;SourceDB = " + ubicacion_fox +
";
SourceTypeÛF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;D
eleted=Yes; "
'cn_fox.CursorLocation = adUseServer
cn_fox.Open

'It executes the command Pack of Fox on all the bases
'to erase the marked files for elimination

cn_fox.Execute "SET EXCLUSIVE ON; PACK Cli_te", adCmdText Or
adExecuteNoRecords

When executing this line a strange error that makes that the Visual Basic
environment closes. I receive this error message:
"Visual Basic has detected a problem and it should close. If it is in the
middle of
process, it can get lost the information with which is working. Inform to
Microsoft of this problem." In the details of the error it says: AppName
vb6.exe
ModName vfpodbc.dll
I am completely for sure the problem is the line that the PACK executes
since if I comment it the rest of the program it is executed well.
Another fact: This only happens me in Windows XP I have proven in a PC with
Win 98 and it makes it correctly!

1. why do you believe that it can be failing?
2. in what other way can I do this?

I attach the file Cli_te.dbf for if somebody has time of making some
it proves. I wait you help me ago a lot that I am renouncing this... From
already
thank you,

Tom.

Preguntas similare

Leer las respuestas

#1 Jordi Maycas
06/09/2004 - 14:20 | Informe spam
sorry, you're in an spanish group.

"Tomás Liendo" escribió en el mensaje
news:
Hello I need to execute the command PACK (that erases all the marked files
for elimination of a FoxPro table)
from an application written in Visual Basic. This makes it in the


following
way (just as me
somebody indicated in this same forum)

'It reopens connection-
cn_fox.ConnectionString = "Provider=MSDASQL.1;Persist Security
Info=False;Data Source=Visual FoxPro Database;Extended


Properties=DSN=Visual
FoxPro Database;UID=;SourceDB = " + ubicacion_fox +
";
SourceTypeÛF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;D
eleted=Yes; "
'cn_fox.CursorLocation = adUseServer
cn_fox.Open

'It executes the command Pack of Fox on all the bases
'to erase the marked files for elimination

cn_fox.Execute "SET EXCLUSIVE ON; PACK Cli_te", adCmdText Or
adExecuteNoRecords

When executing this line a strange error that makes that the Visual Basic
environment closes. I receive this error message:
"Visual Basic has detected a problem and it should close. If it is in the
middle of
process, it can get lost the information with which is working. Inform to
Microsoft of this problem." In the details of the error it says: AppName
vb6.exe
ModName vfpodbc.dll
I am completely for sure the problem is the line that the PACK executes
since if I comment it the rest of the program it is executed well.
Another fact: This only happens me in Windows XP I have proven in a PC


with
Win 98 and it makes it correctly!

1. why do you believe that it can be failing?
2. in what other way can I do this?

I attach the file Cli_te.dbf for if somebody has time of making some
it proves. I wait you help me ago a lot that I am renouncing this... From
already
thank you,

Tom.


Respuesta Responder a este mensaje
#2 ©Alf®edo©
06/09/2004 - 23:15 | Informe spam
microsoft.public.vb

on 06/09/2004, Tomás Liendo supposed :
Hello I need to execute the command PACK (that erases all the marked files
for elimination of a FoxPro table)
from an application written in Visual Basic. This makes it in the following
way (just as me
somebody indicated in this same forum)

'It reopens connection-
cn_fox.ConnectionString = "Provider=MSDASQL.1;Persist Security
Info=False;Data Source=Visual FoxPro Database;Extended Properties=DSN=Visual
FoxPro Database;UID=;SourceDB = " + ubicacion_fox +
";
SourceTypeÛF;Exclusive=No;BackgroundFetch=Yes;Collate=Machine;Null=Yes;D
eleted=Yes; "
'cn_fox.CursorLocation = adUseServer
cn_fox.Open

'It executes the command Pack of Fox on all the bases
'to erase the marked files for elimination

cn_fox.Execute "SET EXCLUSIVE ON; PACK Cli_te", adCmdText Or
adExecuteNoRecords

When executing this line a strange error that makes that the Visual Basic
environment closes. I receive this error message:
"Visual Basic has detected a problem and it should close. If it is in the
middle of
process, it can get lost the information with which is working. Inform to
Microsoft of this problem." In the details of the error it says: AppName
vb6.exe
ModName vfpodbc.dll
I am completely for sure the problem is the line that the PACK executes
since if I comment it the rest of the program it is executed well.
Another fact: This only happens me in Windows XP I have proven in a PC with
Win 98 and it makes it correctly!

1. why do you believe that it can be failing?
2. in what other way can I do this?

I attach the file Cli_te.dbf for if somebody has time of making some
it proves. I wait you help me ago a lot that I am renouncing this... From
already
thank you,

Tom.



Un saludo.

"Nada hay en el mundo tan común como la ignorancia y los charlatanes."
Cleóbulo

Dedicated to crow
email Siga el debate Respuesta Responder a este mensaje
Ads by Google
Help Hacer una preguntaRespuesta Tengo una respuesta
Search Busqueda sugerida