Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
If you can't
login and post questions or you are having trouble viewing forum posts:
Click Here
|
Callback
Support |
If you live in USA, UK, Canada, Australia or New
Zealand, you can leave us details on your question and request us to call you back and discuss
them with you personally (charges apply). |
Click Here
|
Buy Support
Incidents |
If you can't find your answer
in the FREE PUBLIC QDeveloper Forum, require URGENT Priority Support, or you need to send us
private or confidential information: |
Click Here
|
|
Attempt to create in a protected file |
Author |
Message |
|
Posted : 2008-01-12 02:46:27 |
Hello, I have challenge inserting some simple data to table. I’m using Microsoft Visual Studio 2003 and Last version of FlexODBC v4 driver. When I have tried use constructor for generate OdbcConnection, DataAdapter and DataSet I getting alerts for “Select”, “Update”, “Delete” - "There were errors configuring this objects. When I connected it manually and type code below I got an error: “Attempt to create in a protected file”.
Please advise, I appreciate any Yours Help.
Thank You.
ERROR: ERROR [S1000] [FlexODBC][FLEXERR] Attempt to create in a protected file Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.Odbc.OdbcException:
ERROR [S1000] [FlexODBC][FLEXERR] Attempt to create in a protected file
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-01-12 11:04:48 |
Please use VB Demo supplied with FlexODBC to see whether the insert statement actually works with data file (table) in question first. There are a number reasons for a "Attempt to create in a protected file" type error:
a) The .dat file is read only (this often happens when copying files from a CD ROM). b) The data file is a system file and can only have 1 record (or row) in it. So you can't add another row. c) The filemode for the data file (table) has been set as read-only within DataFlex. d) The running dataflex application has set the file mode of the data file to be read-only.
Then see: How do I use FlexODBC over the Internet? and check whether your IIS and permissions settings are correct. |
|
|
|
|
Posted : 2008-01-24 11:43:30 |
Thank You Tom, I appreciate Your help.
I have changed connection string and rights for folder where Database is situated.
Anyway, It has saved one record in table and then I have got this error:
"ERROR [S1000][FlexODBC][FLEXERR] Duplicate records not allowed in file."
in VB Demo Program i have got same error.
Please give some clue where i should look for.
myConnection = "DSN=DataFlex Test32;OLE DB Services=-2;"
myCommand = New Odbc.OdbcCommand (" INSERT INTO F161 (CUSTID, DEALID) VALUES(' " + CUSTID + "','" + DEALID " ')", myConnection)
Sincerely Yours,
Andrii
|
|
|
|
Tom |
|
Group | : Administrator |
Posts | : 5510 |
Joined | : 2006-02-17 |
|
Profile |
|
Posted : 2008-01-25 08:07:00 |
A "Duplicate records not allowed in file" error indicates that a record already exists for the CUSTID and DEALID you are inserting or you are not inserting enough columns to make this record unique as required be the table's (datafile) index structure. |
|
|
|
|