Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #3025 > unrolled thread

Error when instantiating SQLConnection

Started byStefan Ueberbacher <info@sanosoft.com>
First post2012-02-22 23:17 -0800
Last post2012-02-24 19:56 +1100
Articles 4 — 3 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Error when instantiating SQLConnection Stefan Ueberbacher <info@sanosoft.com> - 2012-02-22 23:17 -0800
    Re: Error when instantiating SQLConnection D.J.W. van Kooten <public@ic2remove.this.com> - 2012-02-23 22:36 +0100
      Re: Error when instantiating SQLConnection Stefan Ueberbacher <info@sanosoft.com> - 2012-02-23 23:11 -0800
        Re: Error when instantiating SQLConnection "Stephen Quinn" <stevejqNO@bigpondSPAM.net.au> - 2012-02-24 19:56 +1100

#3025 — Error when instantiating SQLConnection

FromStefan Ueberbacher <info@sanosoft.com>
Date2012-02-22 23:17 -0800
SubjectError when instantiating SQLConnection
Message-ID<b18f745e-d8d5-486e-99d7-e2f3b5662dda@l1g2000vbc.googlegroups.com>
On a machine running Windows Server 2003  the VO-application (VO 2.8
SP3) crashes every time (5333 - Access Violation) when an instance of
the SQLConnection class is to be created. In the ODBC Data Source
Administrator the test for the database connection (SQL Anywhere 12.0)
works fine. Has anybody an idea why?

Stefan

[toc] | [next] | [standalone]


#3033

FromD.J.W. van Kooten <public@ic2remove.this.com>
Date2012-02-23 22:36 +0100
Message-ID<hrbdk71bbuccft963qlphcs7a2csdf0551@4ax.com>
In reply to#3025
On Wed, 22 Feb 2012 23:17:40 -0800 (PST), Stefan Ueberbacher
<info@sanosoft.com> wrote:

>On a machine running Windows Server 2003  the VO-application (VO 2.8
>SP3) crashes every time (5333 - Access Violation) when an instance of
>the SQLConnection class is to be created. In the ODBC Data Source
>Administrator the test for the database connection (SQL Anywhere 12.0)
>works fine. Has anybody an idea why?

Hello Stefan,


It works fine here with the standard classes, so I'll give you some
code hoping you get it working as well.

In the Windows ODBC source definition,  I've selected the MySQL ODBC
5.1 Driver. The database is on an internetsite so when you doubleclick
the connection you add:

Data source name: odbcname  (1st paramater of SQLConnection)
TCP/IP server: IPO address+port
User+PW as given by my client
Databasename: =second paramater of SQLConnection

Then the following code instantiates the connection, prepares and
executes a statement (in var cSQL). It is important not to forget the
last 3 lines, as that casued an error here.

oConn:=SQLConnection{"odbcname","databasename","pw"} 

oStatement:=SQLStatement{cSQL,oConn} IF !oStatement:Execute("")
lok:=FALSE 
ENDIF

IF !Empty(cSQL) 	oStatement:FreeStmt(SQL_DROP) ENDIF
					


Dick

[toc] | [prev] | [next] | [standalone]


#3036

FromStefan Ueberbacher <info@sanosoft.com>
Date2012-02-23 23:11 -0800
Message-ID<6e0fc9bb-ccfb-4583-9e90-be16c60862cb@cj6g2000vbb.googlegroups.com>
In reply to#3033
Hello Dick,

thank you for the help, but I need someone to tell me under which
circumstances an application crashes when an instance of the
SQLConnection class is to be created.

[toc] | [prev] | [next] | [standalone]


#3037

From"Stephen Quinn" <stevejqNO@bigpondSPAM.net.au>
Date2012-02-24 19:56 +1100
Message-ID<reI1r.3384$v14.1985@viwinnwfe02.internal.bigpond.com>
In reply to#3036
Stefan

> thank you for the help, but I need someone to tell me under which
> circumstances an application crashes when an instance of the
> SQLConnection class is to be created.

That's like asking - How long is a piece of string?

Have you read Geoffs papers on 5333s and how to find the causes of them?

You'll probably need to run a DEBUG version of your app. on the machine(s) 
in question to find out what the problems are.
What does the Errorlog say (assuming you have debug turned on so you can get 
valid call stack info).

You don't say if the crash occurs on app. startup or after 30 minutes of 
use.
You may have disk/file corruption, permission/password/network/hardware 
issues, wrong DLL versions, etc...
    - anything that can go wrong on a machine will likely cause problems

Have you disabled any Antivirus programs that are running and tested the 
app. without them running?

Do you have the latest updates for the OS?
Is VO28 compatable with the OS and it's updates?

Does the app. run OK on later/different versions of the OS?

Have you looked at the network with an analyser/sniffer to see what (if any) 
messages are going through?

CYA
Steve 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web