Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #3033
| From | D.J.W. van Kooten <public@ic2remove.this.com> |
|---|---|
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: Error when instantiating SQLConnection |
| Date | 2012-02-23 22:36 +0100 |
| Organization | IC2 |
| Message-ID | <hrbdk71bbuccft963qlphcs7a2csdf0551@4ax.com> (permalink) |
| References | <b18f745e-d8d5-486e-99d7-e2f3b5662dda@l1g2000vbc.googlegroups.com> |
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
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web