Forums

PHP

This topic is locked

PHP,MySql,PHakt and ODBC problems

Posted 01 Jan 2002 18:01:51
1
has voted
01 Jan 2002 18:01:51 matt harris posted:
<font face='Verdana'>
okay i'll break this down so its easier to digest:

1. I have a databse in mySQL hosted on my ISP who support mySql and PHP . The databse is designed in access and ported to my SQL. I can open and import the databse via ODBC in access or via MySQL manager. no problem.

2. I can connect to the database using PHAKT and can confirm a test connection in the correct window.

3. on a live data preview I get the following window (below):

4.The ISP only supports DSNless connections and they have a string that needs to be entered , I think my problem maybe here. This is the string I was given :

rsEvents = Server.CreateObject("ADODB.Recordset"
rsEvents.ActiveConnection = "Driver={MySQL}; DATABASE=databasename;UID=username; PASSWORD=password;"

but I get errors when I input this , instead I tried using :

Driver={MySQL}; DATABASE=databasename;UID=username; PASSWORD=password;"

thing is I can connect okay to the database and pull up the tables when I go to create a recordset but the preview fails. (see window).

please advise.

matt








</font id='Verdana'><img src="www.pixelwork.com/images/screen.jpg" border=0>

Replies

Replied 02 Jan 2002 01:24:12
02 Jan 2002 01:24:12 Tim Green replied:
These issues have been dealt with on a number of occassions. Please search this forum for your answer before posting your question.

CLUE: Your ISP has given you an ASP connection string, it will NEVER work with PHP. Also, your ISP is using a non-standard configuration with their PHP. You will need to add the following code block to each and every page that required DB access:-

&lt;?php
ini_set("include_path", "./";
?&gt;

Unless of course, you can persuade them to make a more permanent amendment in their PHP.ini.

This should put you on the right track.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
Replied 02 Jan 2002 10:29:33
02 Jan 2002 10:29:33 matt harris replied:
okay , sorry - I checked the forum and couldn't find a match for my problem - however I did get it working in the end using the connectivity window in phakt , didn't need the mysql connection string at all.

Reply to this topic