Cool..It works...I removed the print statement and it works...Even the stored procedure code that you gave me which drops the table name also works....Thank you so much...
When I manually try to drop the table, it says "Table is in use.....". But I am very sure that my program is not...
CREATE PROCEDURE "CheckTableExists"();
BEGIN
PRINT 'hai'
END;
Pls find the code for creating a simple stored procedure...
I am trying to run the above stored procedure using the below syntax....
call CheckTableExists()
But to my surprise, the simple text message 'hai' is not printed....Pls...
When I try to save a Stored procedure, I get a error.
Below is the code for the stored procedure:
CREATE PROCEDURE CheckTableExists(in :Table_Name varchar);
BEGIN
DECLARE :TestName char(20);
SELECT XF$Name INTO :TestName FROM X$File WHERE XF$Name=:Table_Name;
IF RTrim(:TestName) = :Table_Name...
With your help, I was able to create a EXE generated through C#.NET 2.0 and Pervasive SQL v10.10 as the backend. The EXE will read .DBF file, create a .MKD file, dump the records from .DBF file to that .MKD file.
This EXE will be running on a daily basis. So supposing this EXE runs on the 2nd...
The purpose of converting .BTR file to .TXT file is to check the validity of the .BTR file.
This is being the usual practice to check whether the .BTR file is valid or not.
When I tried to use the .BTR file in another program, I got the below error:
Fatal Btrieve Error in dbOpen
File =...
I just posted a STAT about the .BTR file created....
C:\Documents and Settings\All Users\Application Data\Pervasive Software\PSQL\Dem
odata>butil -stat glddbf.btr
Btrieve Maintenance Utility 10.30.017.000
Copyright (C) Pervasive Software Inc. 2009
All Rights Reserved.
File Statistics for...
Yes, the provider supports the method GetSchemaTable(). Thank you so much for this help.
Now it looks like I am almost going to conclude the Proof Of Concept (POC).
Now I am able to create a .BTR file using the below syntax.
CREATE TABLE GLDDBF USING 'GLDDBF.BTR' (Acc_Nbr varchar(13),Acc_desc...
The problem with using CREATE TABLE statment is that you should be aware of the table structure.
But our requirement is the table structure should be taken from .DBF file. Using .NET as the front end, I was able to create the table using .DBF file, but all the Datatypes are referring to...
BUTIL -CREATE glddbf.mkd C:\BM_TW_BLR\bmpc\bmbatch\describe\glddbf.des
By issuing the above command in command prompt, GLDDBF.MKD file is created using the structure of GLDDBF.DES
But to my surprise, the GLDDBF.MKD file is not visible in Pervasive Control Center. But GLDDBF.MKD is available...
If there is any approach for the previous post, you can let me know.
Or else, I had currently created a DataTable using C#.NET, which has the structure of .DBF file.
Using Pervasive SQL, I need to create a .MKD file with the help of the above created DataTable.
Pls help...
Thank you so much for your reply.....
I am trying to use the "USING" clause on the CREATE TABLE statement in C#.NET code.
string SQLstr = "SELECT * INTO GLDDBF USING 'E:\\dBase\\GLD0DETL.DBF'";
Here are my questions:
1) I wanted to create a new table with the same structure like...
Hi Mirtheil,
The sample program that you gave works fine. It basically generates T1.MKD file in the Pervasive directory.
But I wanted to create T1.BTR file, basically a Btrieve file.
Thanks for the sample code.
The basic requirement is like this:
1) There are certain old C programs, which should be replaced with C#.NET programs.
2) The C programs reads the .DBF file, converts it to new .BTR file. Yes, I don't have a BTR file. But I have the structure for the .DBF files...
Then, you'd use either Btrieve API, ODBC, OLEDB, Managed Provider (Pervasive.Data.SqlClient) to write to the BTR files.
Can you pls elaborate on this point? I had already downloaded the Managed Provider (Pervasive.Data.SqlClient.dll) and added as a reference to my .NET application.
What are...
I have certain .DBF files (dBASE files, which I am able to open it in Excel), which has to be converted to .BTR file using C#.NET 2.0
I have Visual Studio 2005 environment. Also I have Pervasive v10.10 installed. I would require some sample code, written in .NET which reads .DBF files and...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.