Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Connection String Failure in UD4

Posted 29 Aug 2001 18:02:04
1
has voted
29 Aug 2001 18:02:04 Ian Pitcher posted:
I'm using Iasp on a linux box running apache and mysql - I know that this may not be the ideal asp solution but it's what I've got. Anyway...

I have a custom Connection String [format = "DRIVER=org.gjt.mm.mysql.Driver;URL={jdbc:mysql://ipaddr:mysqlport/dbname};uid=username;pwd=password;"

This works fine in the actual .asp - all data is retuned OK. However I cannot use it in UD4. A 'Test' with this custom connection string simply yields the "an unidentified error has occurred".

I have UD4 checked to connect using the Driver on the Application sever.

The only workaround I have is to define a 'local' connection which uses a ODBC/mysql DSN (so that I can use the UD4 tools to buid recordsets, etc) eg

MM_mydblocal_STRING

and then change all instances of MM_mydblocal_STRING to MM_mydb_STRING before I upload the file.

Obviously I would like to do away with this workaround.

Anyone got any thoughts or similar experiences ?

I

Replies

Replied 30 Aug 2001 01:00:02
30 Aug 2001 01:00:02 Ian Pitcher replied:
Here's a slightly more elegant (IMHO) kludge:

I let my UD4 have it's own way with a local DSN which works with the ODBC MySQLL driver. (call this include file 'Connections/myconn.asp')

This will let me create a data binding (eg Recordset1) with all the table's and data available to create objects.

I then replace the one line:

<pre id=code><font face=courier size=2 id=code>
Recordset1.ActiveConnection = MM_myconn_STRING
</font id=code></pre id=code><center>
with
</center>
<pre id=code><font face=courier size=2 id=code>
myconn_STRING = "DRIVER=org.gjt.mm.mysql.Driver;URL=_
{jdbc:mysql://ipaddr:mysqlport/dbname};uid=username;pwd=password;"
dim filesys
Set filesys = CreateObject("Scripting.FileSystemObject"
If filesys.FolderExists("c:\winnt" Then
Recordset1.ActiveConnection = MM_myconn_STRING
Else
Recordset1.ActiveConnection = myconn_STRING
End If
</font id=code></pre id=code>
Which makes sure that the connection is running on my linux box (no 'c:\winnt' here) and then changes the ActiveConnection definition.

Seems to work, I just wish I could find a way to let UD4 define run-time and design-time connections like UD1 could...

I

Edited by - nicp42 on 08/30/2001 01:07:51
Replied 18 Jul 2002 11:29:26
18 Jul 2002 11:29:26 Colin Miller replied:
Just wondering if this feature has been fixed for DMX? Has anyone tried it?

Reply to this topic