De hostingpartij van mijn opdrachtgever ondersteunt Cold Fusion. Ik gebruik een MS Acces database, maar ik ontdekte dat de relatie met de DB niet met een ODBC-koppeling gemaakt wordt, maar met een of andere ASP-code. Zie uitleg op de website van de hosting:
You can use a Microsoft Access database with your Windows hosting. Upload the database using FTP. Use the server.mappath function in ASP, in order to retrieve the full path to the Access database file. Example in ASP to build a connection string (if the Access database and ASP file are in the same folder):
Ook kreeg ik een link: http://www.haneng.com/lessons_20.asp als uitleg, maar ik snap er geen fluit van en hoop dat hier iemand weet wat nou de bedoeling is. Het lijkt erop dat ik in elke (ASP??? ik gebruik CF!!!) pagina een ingewikkelde code moet plaatsen zoals deze:
(die stond op de site van www.haneng.com)
Wie kan mij helpen???
You can use a Microsoft Access database with your Windows hosting. Upload the database using FTP. Use the server.mappath function in ASP, in order to retrieve the full path to the Access database file. Example in ASP to build a connection string (if the Access database and ASP file are in the same folder):
code:
1
2
3
| Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)};
DBQ=" & Server.MapPath("sample.mdb") & ";" |
Ook kreeg ik een link: http://www.haneng.com/lessons_20.asp als uitleg, maar ik snap er geen fluit van en hoop dat hier iemand weet wat nou de bedoeling is. Het lijkt erop dat ik in elke (ASP??? ik gebruik CF!!!) pagina een ingewikkelde code moet plaatsen zoals deze:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
| <HTML>
<BODY>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("sample.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
SQL_query = "SELECT * FROM Friends"
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>
<LI><%=RS("Name")%>: <A HREF="<%=RS("Link")%>">Homepage</A>
<%
RS.MoveNext
WEND
%>
</BODY>
</HTML> |
(die stond op de site van www.haneng.com)
Wie kan mij helpen???