[thelist] Problem with CF - Datasource DSN LESS (??)
Luca Balboni
lucabalboni at mac.com
Wed Jul 11 01:30:58 CDT 2001
Hello all,
This is my first message. I have been subscribed for almost a month,
learning really a lot from you all.
I am writing because I am doing my first web site using Cold Fusion with a
few problems and A LOT of fun. I've just discovered CF and I love it.
One of the problems I have is that I do not understand how to query the
database without using a DSN. In the server where the site is hosted I can
only use a DSN and my provider wrote me that I can have additional databases
using a DSN LESS connection, specifying the path where the database file is.
Following is the code I am using to specifying the datasource:
----------------------------------
<cfquery name="getIps" DATASOURCE="d:/325UX2/poll/poll.mdb" DBTYPE="OLEDB"
provider="Microsoft.Jet.OLEDB.4.0" providerdsn="d:/325UX2/poll/poll.mdb">
select IPS from poll_IPS
where IPS = '#yourip#'
</cfquery>
----------------------------------
Unfortunately it does not work and my provider does not want to help
anymore. Following is the error I get once opening an example page with
Explorer:
----------------------------------
Error Occurred While Processing Request
Error Diagnostic Information
OLEDB Error Code = 0
Unknown Connect error!
The error occurred while processing an element with a general identifier of
(CFQUERY), occupying document position (3:1) to (3:148).
----------------------------------
and this is the code I have in the example page:
<html>
<head>
<title>example page</title>
</head>
<body>
<table cellpadding="2" cellspacing="0" border="1" width="200">
<tr>
<td bgcolor="647A64">
<div align="center"><fontface="Arial,Helvetica,sans-serif" size="1"
color="ffffff">Poll</font>
</div></td>
</tr>
<tr>
<td bgcolor="CCD4CC"><div align="center"><cfinclude
template="poll.cfm"></div></td>
</tr>
</table>
</body>
</html>
I hope someone can help me.
Cheers,
luca
More information about the thelist
mailing list