<head>ADODB koppling - glad om någon vill hjälpa mig
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Salong Benedict - Anita Ljunggren</title>
<STYLE type=text/css>
BODY {
FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 10pt
}
.text {
FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 10pt
}
H4 {
FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 11pt
}
H3 {
FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 13pt
}
TD {
FONT-FAMILY: Verdana,Arial,Helvetica; FONT-SIZE: 10pt
}
A:link {
COLOR: #990000; FONT-FAMILY: Arial,Helvetica; TEXT-DECORATION: none
}
A:visited {
COLOR: #990000; FONT-FAMILY: Arial,Helvetica; TEXT-DECORATION: none
}
A:hover {
COLOR: #0000ff; FONT-FAMILY: Arial,Helvetica; TEXT-DECORATION: underline
}
</STYLE>
</head>
<Body bgcolor=white>
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
' Get Current Category
cat = TRIM( Request( "cat" ) )
IF cat = "" THEN cat = "Behandlingar"
---------------------------------------------------------------------------------------------------
Denna har jag provat att använda istället för befintlig databaskoppling, men får det inte att fungera.
Set oDB = Server.CreateObject("ADODB.Connection")
oDB.Open "Driver={Microsoft Access Driver (*.mdb)};Dbq=anitasdata/AnitaInternet.mdb;"
-----------------------------------------------------------------------------------------------------------------
' Open Database Connection
Set Con = Server.CreateObject( "ADODB.Connection" )
Con.Open "AnitaInternet"
%>
<%
Set prodRS = Server.CreateObject( "ADODB.Recordset" )
prodRS.ActiveConnection = Con
sqlString = "SELECT product_id, product_picture, product_name, Behandlings_pris, product_briefDesc , product_fulldesc " &_
"FROM Behandlingar WHERE product_category='" & cat & "' " &_
"AND product_status=1 " &_
"ORDER BY product_id "
prodRS.Open sqlString
%>
<TABLE width="100%" cellpadding=0 cellspacing=0 border=0>
<TR><TD>
<BR>
<IMG SRC=IMAGES/bildstorlek5.jpg>
<BR>
<BR>
<IMG SRC=IMAGES/behandlingar2.gif>
<%
WHILE NOT prodRS.EOF
%>
<TABLE width="470" height=10 cellpadding=0 cellspacing=0 border=0>
<TR bgcolor=#CCCCCC ><TD>
<b><FONT FACE="Verdana,Arial" SIZE="2" color=#000000><%=prodRS( "product_name" )%></FONT></b>
</TD></TR></TABLE>
<TABLE width="470" cellpadding=2 cellspacing=0 border=0>
<TR ><TD width="250">
<FONT FACE="Verdana,ARIAL" SIZE="2" color=#000000><%=prodRS( "product_briefDesc" )%></FONT></TD>
<TD width="120"><FONT FACE="Verdana,ARIAL" SIZE="2" color=#000000><%=prodRS( "product_fulldesc" )%></FONT></TD>
<td width="100"><FONT FACE="Verdana,ARIAL" SIZE="2" color=#000000><%=prodRS( "Behandlings_pris" )%> </FONT></TD>
</TR></TABLE>
<%
prodRS.MoveNext
WEND
%>
<BR>
<HR valign=top align=left Width=470 size=-1>
<FONT face=Arial size=1> (c) Anita
Ljunggren 2000-2001</FONT>
</TD></TR></TABLE>