Subject | RE: [ib-support] Need help on Limbo Transaction :) |
---|---|
Author | Reggie White |
Post date | 2002-04-30T05:14:47Z |
Did you link in the *.lib file into your project? That may solve your
unresolved external problem with the program.
-----Original Message-----
From: cltan8 [mailto:cltan8@...]
Sent: Monday, April 29, 2002 8:06 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] Need help on Limbo Transaction :)
Hello everybody,
I have some problems trying to create a database into a Limbo state.
I have tried several solutions by posted in mers.com and interbase
newsgroup.
FYI, I am currently creating a utility to recover Limbo Transaction
and am
using FireBird 1.0 as the database.
I am using Delphi 6.0 Profesional with Interbase Express Admin
component,
and I need to test this
utility with a database that has Limbo Transaction state.
I have tried the normal way by un-plugging the netword cable and
switch off
the power while performing
transactions on two databases (other word - two-phase commit ) but
still I
couldn't get the database
into Limbo state.
I have tried the solution posted by Ann but I couldn't compile the
program
below
due to some unresolved external symbol on isc_attach_database and
other
isc_functions.
I am using Visual C++ 5.0 to compile the code below with Firebird 1.0
(ibase.h) file as the header file.
<--> Please help on how to compile and use isc_attach_database and
others in
C++
/*
* Program type: API Interface
*
* Desription:
* This program demonstrates the prepare call.
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include <stdlib.h>
#include <string.h>
#include <ibase.h>
#include <stdio.h>
isc_db_handle DB = 0; /* database handle */
isc_tr_handle trans = 0; /* transaction handle */
long status[20]; /* status vector */
int main (
int argc),
char ** argv)
{
char empdb[128];
if (argc > 1)
strcpy(empdb, argv[1]);
else
strcpy(empdb, "employee.gdb");
if (isc_attach_database(status, 0, empdb, &DB, 0, NULL))
{
isc_print_status(status);
return 1;
}
if (isc_start_transaction(status, &trans, 1, &DB, 0, NULL))
{
isc_print_status(status);
return 1;
}
if (isc_prepare_transaction(status, &trans))
{
isc_print_status(status);
return 1;
}
return 0;
}
I have tried too on Ivan Prenosil example:
-start QLI
-Connect to database (READY)
-Execute First Phase of 2PC commit ( PREPARE )
-Kill QLI
but I couldn't get the database into Limbo state. Any examples in
Delphi or
some sort ?
I have tried too on Dmitry Kuzmenk example:
Open 2 IBDatabases with IBX connected to one IBTransaction.
Start transaction. change some data in both databases.
Terminate application or simply unplug network connector from
client machine. You got it.
but I couldn't get the database into Limbo state. Any examples in
Delphi or
some sort ?
Is there any other sites where I can just get a ready made database
that is
in Limbo state ? ;)
Thanks for reading this long problem and thank you.
Tan Chin Leong
Chysanth Software Sdn. Bhd.
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
unresolved external problem with the program.
-----Original Message-----
From: cltan8 [mailto:cltan8@...]
Sent: Monday, April 29, 2002 8:06 PM
To: ib-support@yahoogroups.com
Subject: [ib-support] Need help on Limbo Transaction :)
Hello everybody,
I have some problems trying to create a database into a Limbo state.
I have tried several solutions by posted in mers.com and interbase
newsgroup.
FYI, I am currently creating a utility to recover Limbo Transaction
and am
using FireBird 1.0 as the database.
I am using Delphi 6.0 Profesional with Interbase Express Admin
component,
and I need to test this
utility with a database that has Limbo Transaction state.
I have tried the normal way by un-plugging the netword cable and
switch off
the power while performing
transactions on two databases (other word - two-phase commit ) but
still I
couldn't get the database
into Limbo state.
I have tried the solution posted by Ann but I couldn't compile the
program
below
due to some unresolved external symbol on isc_attach_database and
other
isc_functions.
I am using Visual C++ 5.0 to compile the code below with Firebird 1.0
(ibase.h) file as the header file.
<--> Please help on how to compile and use isc_attach_database and
others in
C++
/*
* Program type: API Interface
*
* Desription:
* This program demonstrates the prepare call.
*
* The contents of this file are subject to the Interbase Public
* License Version 1.0 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy
* of the License at http://www.Inprise.com/IPL.html
*
* Software distributed under the License is distributed on an
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
* or implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code was created by Inprise Corporation
* and its predecessors. Portions created by Inprise Corporation are
* Copyright (C) Inprise Corporation.
*
* All Rights Reserved.
* Contributor(s): ______________________________________.
*/
#include <stdlib.h>
#include <string.h>
#include <ibase.h>
#include <stdio.h>
isc_db_handle DB = 0; /* database handle */
isc_tr_handle trans = 0; /* transaction handle */
long status[20]; /* status vector */
int main (
int argc),
char ** argv)
{
char empdb[128];
if (argc > 1)
strcpy(empdb, argv[1]);
else
strcpy(empdb, "employee.gdb");
if (isc_attach_database(status, 0, empdb, &DB, 0, NULL))
{
isc_print_status(status);
return 1;
}
if (isc_start_transaction(status, &trans, 1, &DB, 0, NULL))
{
isc_print_status(status);
return 1;
}
if (isc_prepare_transaction(status, &trans))
{
isc_print_status(status);
return 1;
}
return 0;
}
I have tried too on Ivan Prenosil example:
-start QLI
-Connect to database (READY)
-Execute First Phase of 2PC commit ( PREPARE )
-Kill QLI
but I couldn't get the database into Limbo state. Any examples in
Delphi or
some sort ?
I have tried too on Dmitry Kuzmenk example:
Open 2 IBDatabases with IBX connected to one IBTransaction.
Start transaction. change some data in both databases.
Terminate application or simply unplug network connector from
client machine. You got it.
but I couldn't get the database into Limbo state. Any examples in
Delphi or
some sort ?
Is there any other sites where I can just get a ready made database
that is
in Limbo state ? ;)
Thanks for reading this long problem and thank you.
Tan Chin Leong
Chysanth Software Sdn. Bhd.
To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/