My app used to connect just fine via .NET api to SQLAny version 2044, using srvPath Program FilesSQLAny11dbsrv11.exe and argStr -x tcpip -n BCFSHH29668 -c 20M "Storage CardSybasetrailer.db" and ConnectionString Data Source=SQLAnywhere 11 trailer; uid=dba;pwd=sql and commandLine -q -c eng=BCFSHH29668;dbn=trailer;uid=dba;pwd=sql -ot dbsync1.txt

Now I get following SAException with message "DB Failure, Ex: Cannot read .ini file."

at iAnywhere.Data.SQLAnywhere.SAInternalConnection.CheckException(Int32 idEx, Boolean freeConn) at iAnywhere.Data.SQLAnywhere.SAInternalConnection.OpenConnection() at iAnywhere.Data.SQLAnywhere.SAInternalConnection..ctor(SAConnection parent, Boolean pooled, Object dtcTran, String connectionString, SAConnectionGroup connectionGroup) at iAnywhere.Data.SQLAnywhere.SAConnectionPool..ctor(String connectionString, Hashtable connectionOption) at iAnywhere.Data.SQLAnywhere.SAConnectionPoolManager.AllocateConnection(SAConnection parent, Object dtcTran, String connectionString, Hashtable connectionOptions) at iAnywhere.Data.SQLAnywhere.SAConnection.Open() at TrailerMovement.Common.DatabaseManager.OpenDBConnection() at TrailerMovement.MainAppScreen.MainAppScreen_Load(Object sender, EventArgs e) at System.Windows.Forms.Form.OnLoad(EventArgs e) at System.Windows.Forms.Form._SetVisibleNotify(Boolean fVis) at System.Windows.Forms.Control.set_Visible(Boolean value) at System.Windows.Forms.Application.Run(Form fm) at TrailerMovement.Program.Main()

I didn't change anything that I know of, and on some devices this saex is being thrown intermittently, depending on whne the debug version has been deployed to the device. I have compared/verified registry entries for Comm and Software. Is this permissions based? ConnectionPool? version of iAnywhere.Data.SQLAnywhere.dll?

I'm stumped.

asked 23 Nov '11, 18:31

craigh's gravatar image

craigh
1222
accept rate: 0%

edited 05 Jul '13, 21:55

Mark%20Culp's gravatar image

Mark Culp
22.6k9129265


Is there anybody out there?

The biggest mystery about this is the message "Cannot read .ini file". What .ini file is being referred to? There is no such file, nor has there ever been for this ap, and it used to run just fine. Now blocked. I have searcehd Sybase online documentation for ref to this .ini file or any similar cases, there's nothing. The iAnywhere help doesn't mention any cases like this either. It just feels wrong, like there must be some explanation why this exception is suddenly appearing. Any insight or advice would be appreciated! Thanks.

permanent link

answered 28 Nov '11, 13:01

craigh's gravatar image

craigh
1222
accept rate: 0%

Is there anybody out there?

Yes, Technical Support is always ready to assist during business hours (8 a.m. to 6 p.m., local time) - See: http://www.sybase.com/contactus/support/ for more details.

(28 Nov '11, 15:13) Jeff Albion

I didn't change anything that I know of, and on some devices this saex is being thrown intermittently, depending on whne the debug version has been deployed to the device.

Which "debug" version are you referring to here?

The biggest mystery about this is the message "Cannot read .ini file". What .ini file is being referred to?

I believe this is a result of CR #667441 and a temporary inability to access the DSN definition. The error message is not consistent with the actual error condition.

My ap used to connect just fine via .NET api to SQLAny version 2044

Have you tried a later EBF version to see if the behaviour is resolved? (See: Windows x86/x64 11.0.1.2713 EBF)

permanent link

answered 28 Nov '11, 13:51

Jeff%20Albion's gravatar image

Jeff Albion
10.7k171174
accept rate: 24%

Sorry, when I say debug version I mean the .NET ap running in debug mode inside Visual Studio. I have more than 1 version. This is not really relevant.

I have updated to EBF 11.0.12724 and I continue to get the same problem and the same saex message. So the misleading error message is not corrected in this case, but I understand the problem is invalid DSN. What is best practice for telling .NET ap the DSN of the running iAnywhere engine that has start the local iAnywhere db? I didn't think this was a tricky step and in past had no problem with:

GConn = new SAConnection("Data Source=SQLAnywhere 11 dbname;uid=dba;pwd=sql"); GConn.Open();

The context for these calls is that the server is started and the db is ready to accept requests.

(05 Jan '12, 14:13) craigh

I mean EBF 11.0.1.2724, this is latest from Dec 2011.

(05 Jan '12, 14:17) craigh

OK. I fixed this by switching connection string to following: "ENG=servername;DBN=dbname;uid=dba;pwd=sql"

I don't know what chnaged or why original working connectionstring suddenly failed. But at least I have a working mobile ap once again.

(05 Jan '12, 16:54) craigh
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×137
×55
×12
×11

question asked: 23 Nov '11, 18:31

question was seen: 2,699 times

last updated: 05 Jul '13, 21:55