Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.Net and interbase connection

Status
Not open for further replies.

abraxas

Programmer
Jan 15, 2001
75
AU
Hi all,
I have a c#.net form that opens a dialog box to enable a user to point to an interbase .gdb. Sadly this OpenFile() action seems to create a lock on the .gdb file causing a log error
SQLCODE=-902
Error while trying to open file
unknown win32 error 32
ibcode=isc_io_error

when my app goes on to process the file. The process sends a path variable (path/file user selects in dialog) to a sql2000 DTS package which uses LCPI_Provider (full version) to copy Interbase gdb to sql2000. The dialog box object is destroyed after assigning the path name to string var and before the DTS package attempts to access the gdb. Also tried openning readonly.

I've done a bit of research into this and things seem to point to a readonly flag being set somewhere when the openfile dialog is used. This problem NEVER occurs when you type the path into the text field on the form, only when you select it with the openfile dialog. I even harcoded path literals into the app, used the fileopen dialog (which was just a dummy call) and it falls over. I must stress that the dialog box works for other file types such as .txt or .dat when importing csv files. Only the gdb files.

I found two web sources (1 french) that cite similar problems but with no solution, although one mentioned using an alias but didn't elaborate.

I have checked ibserver license and that is ok. 6 users.
The players
Ibserver 5.0
Sql Server 2000
LCPI_Provider in conjunction with DTS
.Net framework 1.1.4322.0
vs.NET 2003 Enterprise

As I said the app/process does as it's supposed to do only when the openfile dialog is NOT used. I've checked the path name, returned by openfile dialog, and the path is exactly as it should be.

I was wondering if anyone one had similar experiences and whether there was a work around. I can use an .ini file to store the path or just hard code it but I'd like to make the app a bit more versatile.

Many thanks for your efforts. Tek-Tips is brilliant!
regards
Anthony Lawrence
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top