Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recordset/Testing server driving me crazy...

Status
Not open for further replies.

rlinsurf

IS-IT--Management
Jun 23, 2008
4
0
0
US
I've tried everything I know to set these things up, and maybe it's just me, but no matter what I do I get an error. My isp's TS has also given up.

As far as I understand, the recordset is for communications with a MYSQL database. But my database server isn't the same as my ftp regular website server. But recordset only uses my ftp server in it's setup.

Can somebody tell me what I'm doing wrong?

Thanx :)
 
Here's some more information:

Hi--

I have the following servers. The first is my main web server:

host: nyartu.pair.com
directory: /usr/home/grndlvl/
user: grndlvl
password: ••••••••

This works fine for editing webpages and such, and tests fine.

This is where my MySQL databases are served:
Server: db49a.pair.com
User: grndlvl_5
Password: ••••••••

Every time I try to set this up, I only get my ftp server as the server and the connection (Steps 1., 3.). But when I add the MySQL server as the MySQL Connection, and then click Select to get the database list, I get an HTTP 404 error, saying the testing server doesn't map to the URL prefix, or there isn't a testing server.

When setting up the testing server, I had to setup a different server than my ftp server, because that has no option to have a testing server, but is only one screen. I set a remote and testing server for the new site, both wiith the same information as the ftp server. Still, I get the same error. As well, the only connection in the recordset dialog I am able to use is the ftp server...?

Very Confused :(

 
there is more to connection and I suspect that odbc is not setup right...so try using or searching for DSNless connections.
driver={mysql}; database=yourdatabase;uid=username;pwd=password;option=16386;

:-------------------------------------:
Do the DW »|MostarNetworks|
 
What language are you using? For PHP use something like
Code:
<?php
$link = mysql_connect('db49a.pair.com', 'grndlvl_5', 'yourpassword');
if (!$link) {
    die('Could not connect: ' . mysql_error());
}
mysql_select_db("yourdatabasename");
$strSQL='Select myfield FROM mytable';
$result = mysql_query($strSQL);
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
echo($row);
}
mysql_free_result($result);
mysql_close($link);
?>

If you are using ASP something like
Code:
<%
dim objcon
Set ObjCon = Server.CreateObject("ADODB.Connection")
ObjCon.Open "Driver={MySQL ODBC 3.51 Driver};" & _ 
           "Server=db49a.pair.com;" & _
           "Port=3306;" & _
           "Option=3;" & _
           "Stmt=;" & _
           "Database=yourdatabasename;" & _
           "Uid=grndlvl_5;" & _
           "Pwd=yourpassword;"
strSQL="Select myfield FROM mytable;"
Set rs = ObjCon.Execute(StrSQL)
if not rs.eof then
do while not rs.eof
response.write (rs("myfield") & "<br />"
loop
end if
rs.Close
set rs=Nothing
ObjCon.Close
Set ObjCon = Nothing
%>

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
OOPS - don't forget the closing bracket!
Code:
response.write (rs("myfield") & "<br />"[COLOR=red])[/color]

___________________________________________________________
If you want the best response to a question, please check out FAQ222-2244 first.
'If we're supposed to work in Hex, why have we only got A fingers?'
Drive a Steam Roller
Steam Engine Prints
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top