|
 |
|
|
06-05-2006, 06:11 PM
|
ADODB.Recordset error
|
Posts: 61
|
i have just uploaded my site and come across a problem, when trying to access my asp pages i get this error - ADODB.Recordset error. i created a DSNless connection but it doesnt seem to like it. this is the site www.petsnco.com
this is my dnsless connection
Code:
<%
' FileName="Connection_odbc_conn_dsn.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_Petwise_STRING
MM_Petwise_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("../db/Petwise.mdb")
%>
Last edited by redgeordieboy99; 06-05-2006 at 06:40 PM..
|
|
|
|
06-05-2006, 07:43 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
I'm not sure if this has anything to do with it, but the first five lines in that code are all commented out (anything with a ' in front of it is a comment line.)
|
|
|
|
06-05-2006, 07:54 PM
|
Re: ADODB.Recordset error
|
Posts: 61
|
ive been told that the first five lines dont need to be there, i dont know why but there it goes, i just copies the connection from somewhere else, but it has worked fine before. The only important bit is what isnt commented out.
|
|
|
|
06-05-2006, 08:01 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Well, the line LOOKS right, but it's hard to tell.
How about you post the entire code for the page as well as the error?
|
|
|
|
06-05-2006, 08:14 PM
|
Re: ADODB.Recordset error
|
Posts: 61
|
here is the offending page
Code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/Petwise.asp" -->
<%
Dim rsViewProds
Dim rsViewProds_numRows
Set rsViewProds = Server.CreateObject("ADODB.Recordset")
rsViewProds.ActiveConnection = MM_Petwise_STRING
rsViewProds.Source = "SELECT * FROM Product ORDER BY ProdID ASC"
rsViewProds.CursorType = 0
rsViewProds.CursorLocation = 2
rsViewProds.LockType = 1
rsViewProds.Open()
rsViewProds_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index
Repeat1__numRows = 4
Repeat1__index = 0
rsViewProds_numRows = rsViewProds_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
Dim rsViewProds_total
Dim rsViewProds_first
Dim rsViewProds_last
' set the record count
rsViewProds_total = rsViewProds.RecordCount
' set the number of rows displayed on this page
If (rsViewProds_numRows < 0) Then
rsViewProds_numRows = rsViewProds_total
Elseif (rsViewProds_numRows = 0) Then
rsViewProds_numRows = 1
End If
' set the first and last displayed record
rsViewProds_first = 1
rsViewProds_last = rsViewProds_first + rsViewProds_numRows - 1
' if we have the correct record count, check the other stats
If (rsViewProds_total <> -1) Then
If (rsViewProds_first > rsViewProds_total) Then
rsViewProds_first = rsViewProds_total
End If
If (rsViewProds_last > rsViewProds_total) Then
rsViewProds_last = rsViewProds_total
End If
If (rsViewProds_numRows > rsViewProds_total) Then
rsViewProds_numRows = rsViewProds_total
End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsViewProds_total = -1) Then
' count the total records by iterating through the recordset
rsViewProds_total=0
While (Not rsViewProds.EOF)
rsViewProds_total = rsViewProds_total + 1
rsViewProds.MoveNext
Wend
' reset the cursor to the beginning
If (rsViewProds.CursorType > 0) Then
rsViewProds.MoveFirst
Else
rsViewProds.Requery
End If
' set the number of rows displayed on this page
If (rsViewProds_numRows < 0 Or rsViewProds_numRows > rsViewProds_total) Then
rsViewProds_numRows = rsViewProds_total
End If
' set the first and last displayed record
rsViewProds_first = 1
rsViewProds_last = rsViewProds_first + rsViewProds_numRows - 1
If (rsViewProds_first > rsViewProds_total) Then
rsViewProds_first = rsViewProds_total
End If
If (rsViewProds_last > rsViewProds_total) Then
rsViewProds_last = rsViewProds_total
End If
End If
%>
<%
Dim MM_paramName
%>
<%
' *** Move To Record and Go To Record: declare variables
Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined
Dim MM_param
Dim MM_index
Set MM_rs = rsViewProds
MM_rsCount = rsViewProds_total
MM_size = rsViewProds_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter
MM_param = Request.QueryString("index")
If (MM_param = "") Then
MM_param = Request.QueryString("offset")
End If
If (MM_param <> "") Then
MM_offset = Int(MM_param)
End If
' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' move the cursor to the selected record
MM_index = 0
While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
If (MM_rs.EOF) Then
MM_offset = MM_index ' set MM_offset to the last possible record
End If
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
MM_index = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = MM_index
If (MM_size < 0 Or MM_size > MM_rsCount) Then
MM_size = MM_rsCount
End If
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
MM_index = 0
While (Not MM_rs.EOF And MM_index < MM_offset)
MM_rs.MoveNext
MM_index = MM_index + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
rsViewProds_first = MM_offset + 1
rsViewProds_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (rsViewProds_first > MM_rsCount) Then
rsViewProds_first = MM_rsCount
End If
If (rsViewProds_last > MM_rsCount) Then
rsViewProds_last = MM_rsCount
End If
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth
Dim MM_removeList
Dim MM_item
Dim MM_nextItem
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If
MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
MM_nextItem = "&" & MM_item & "="
If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then
MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "") Then
MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev
Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
MM_paramList = Split(MM_keepMove, "&")
MM_keepMove = ""
For MM_paramIndex = 0 To UBound(MM_paramList)
MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then
MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If
MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = MM_urlStr & "0"
MM_moveLast = MM_urlStr & "-1"
MM_moveNext = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
MM_movePrev = MM_urlStr & "0"
Else
MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/Main.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<!-- InstanceBeginEditable name="doctitle" -->
<title>Petwise</title>
<!-- InstanceEndEditable --><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="PetStyle.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable -->
</head>
<body onLoad="MM_preloadImages('images/button-home-down2.png','images/button-news-down2.png','images/button-products-down2.png','images/button-game-down2.png','images/button-findus-down2.png','images/button-contact-down2.png')">
<table width="930" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="left" valign="top">
<td width="40" height="139" class="BorderTopLeft"> </td>
<td width="850" height="139" class="Header"> </td>
<td width="40" height="139" class="BorderTopRight"> </td>
</tr>
<tr align="left" valign="top">
<td width="40" height="30" class="BorderUpright"> </td>
<td width="850" height="30"><a href="javascript:;" onClick="MM_goToURL('parent','home.html');return document.MM_returnValue" onMouseOver="MM_swapImage('Image1','','images/button-home-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-home-up2.png" name="Image1" width="145" height="30" border="0" id="Image1"></a><a href="javascript:;" onClick="MM_goToURL('parent','news.asp');return document.MM_returnValue" onMouseOver="MM_swapImage('Image2','','images/button-news-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-news-up2.png" name="Image2" width="141" height="30" border="0" id="Image2"></a><a href="javascript:;" onClick="MM_goToURL('parent','products.asp');return document.MM_returnValue" onMouseOver="MM_swapImage('Image3','','images/button-products-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-products-up2.png" name="Image3" width="141" height="30" border="0" id="Image3"></a><a href="javascript:;" onClick="MM_goToURL('parent','game.html');return document.MM_returnValue" onMouseOver="MM_swapImage('Image4','','images/button-game-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-game-up2.png" name="Image4" width="141" height="30" border="0" id="Image4"></a><a href="javascript:;" onClick="MM_goToURL('parent','find.html');return document.MM_returnValue" onMouseOver="MM_swapImage('Image5','','images/button-findus-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-findus-up2.png" name="Image5" width="141" height="30" border="0" id="Image5"></a><a href="javascript:;" onClick="MM_goToURL('parent','contact.asp');return document.MM_returnValue" onMouseOver="MM_swapImage('Image6','','images/button-contact-down2.png',1)" onMouseOut="MM_swapImgRestore()"><img src="http://www.webmaster-talk.com/images/button-contact-up2.png" name="Image6" width="141" height="30" border="0" id="Image6"></a></td>
<td width="40" height="30" class="BorderUpright"> </td>
</tr>
<tr align="left" valign="top">
<td width="40" class="BorderSpacer"> </td>
<td width="850"><!-- InstanceBeginEditable name="Content" -->
<table width="850" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="40" colspan="2" class="HeadingProducts"><div align="right"></div></td>
</tr>
<tr>
<td width="170" align="center" valign="top"><form action="search_results.asp" method="post" name="fmSearch1" class="SearchBorder" id="fmSearch1">
<table width="150" border="0" cellpadding="0" cellspacing="0" bordercolor="#E0DFE3">
<tr>
<td height="20"><div align="center" class="TextTitles"></div></td>
</tr>
<tr>
<td height="20" bordercolor="#000000" class="TextBold"><div align="center" class="TextBold">
<div align="center"><span class="TextBold">Category</span> Search</div>
</div></td>
</tr>
<tr>
<td height="20" bordercolor="#000000"><div align="center" class="textSearch">
<div align="center" class="TextMain"></div>
</div></td>
</tr>
<tr>
<td height="20" bordercolor="#000000"> <div align="center">
<select name="Category" class="textSearch" id="select">
<option selected>Select Value</option>
<option value="Dog">Dog</option>
<option value="Cat">Cat</option>
<option value="Fish">Fish</option>
<option value="Rabbit/Guinea Pig">Rabbit/ GuineaPig</option>
<option value="Chinchilla">Chinchilla</option>
<option value="Chipmunk">Chipmunk</option>
<option value="Sm Rodent">Sm Rodent</option>
<option value="Ferret">Ferret</option>
<option value="Reptile">Reptile</option>
<option value="Bird">Bird</option>
</select>
</div></td></tr>
<tr>
<td bordercolor="#000000"><div align="center" class="textSearch">
<div align="center">
<p><span class="TextMain">
<input name="Submit" type="submit" class="textSearch" value="Search">
</span></p>
</div>
</div></td>
</tr>
<tr>
<td height="20" bordercolor="#000000"> <div align="center" class="TextMain">
</div></td></tr>
<tr>
<td height="20" bordercolor="#000000"><div align="center">
</div></td>
</tr>
<tr>
<td>
<div align="center"> </div></td></tr>
</table>
</form> <p> </p>
<br>
<p> </p></td>
<td width="680" align="left" valign="top"><table width="650" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" class="TextMain"><p>In this section you can view a selection of products available instore. Unfortunately we can not offer online ordering at the moment. We can arange free local delivery but if you require something delivered further, just contact us and we will try to accomodate your request. </p>
<p>To view the products either page through the whole list of products or narrow the list by searching on the Brand and Category. </p></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<tr class="TextAdminBold">
<td colspan="3"><div align="center">showing products </div></td>
</tr>
<tr class="TextAdminBold">
<td colspan="3"><div align="center"><%=(rsViewProds_first)%> to <%=(rsViewProds_last)%> of <%=(rsViewProds_total)%></div></td>
</tr>
<tr class="TextAdminBold">
<td width="317"><div align="right">
<% If MM_offset <> 0 Then %>
<A HREF="<%=MM_movePrev%>"><< Previous</A>
<% End If ' end MM_offset <> 0 %>
</div></td>
<td width="23"> </td>
<td width="310"><div align="left">
<% If Not MM_atTotal Then %>
<A HREF="<%=MM_moveNext%>">Next >></A>
<% End If ' end Not MM_atTotal %>
</div></td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
</table>
<table width="650" border="4" cellpadding="2" cellspacing="0" bordercolor="#9CC472">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsViewProds.EOF))
%>
<tr>
<td width="364" align="left" valign="middle" class="TextAdminBold">Product : <span class="TextMain"><%=(rsViewProds.Fields.Item("ProdName").Value)%></span></td>
<td width="152" align="left" valign="middle"><span class="TextAdminBold">Price</span> <span class="TextMain">£<%= FormatNumber((rsViewProds.Fields.Item("Price").Value), 2, -2, -2, -2) %></span></td>
<td width="108" align="center" valign="middle"><div align="center"><img src="<%=(rsViewProds.Fields.Item("PicSmall").Value)%>"></div></td>
</tr>
<tr>
<td colspan="3"><div align="center" class="TextBold"><A HREF="product_details.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "ProdID=" & rsViewProds.Fields.Item("ProdID").Value %>" class="TextBold">More Details</A> </div></td>
</tr>
<tr>
<td colspan="3" class="ProductsSpacer2"> </td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsViewProds.MoveNext()
Wend
%>
</table>
<p> </p></td>
</tr>
</table>
<!-- InstanceEndEditable --></td>
<td width="40" class="BorderSpacer"> </td>
</tr>
<tr align="left" valign="top">
<td width="40" height="40" class="BorderBottomLeft"> </td>
<td width="850" height="40" align="center" class="BorderBottom"><a href="sitemap.html">Sitemap</a> | <a href="privacy.html">Privacy Policy</a> | Copyright © 2006 </td>
<td width="40" height="40" class="BorderBottomRight"> </td>
</tr>
</table>
</body>
<!-- InstanceEnd --></html>
<%
rsViewProds.Close()
Set rsViewProds = Nothing
%>
|
|
|
|
06-05-2006, 08:20 PM
|
Re: ADODB.Recordset error
|
Posts: 61
|
this is the folder structure
root -
db - database
images - images used in pages
stock - stock images
www - all web pages
Connections - DNS
|
|
|
|
06-05-2006, 08:45 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
And the error message? (It's in there that the important info is.)
|
|
|
|
06-06-2006, 07:27 AM
|
Re: ADODB.Recordset error
|
Posts: 61
|
this is the error
HTML Code:
ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/products.asp, line 10
Last edited by redgeordieboy99; 06-06-2006 at 07:28 AM..
|
|
|
|
06-06-2006, 12:36 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Try using 3 for both CursorType and CursorLocation and removing your LockType . I have this inside of a stored subprocedure (within my ASP code) and it's never once given me grief.
|
|
|
|
06-06-2006, 05:26 PM
|
Re: ADODB.Recordset error
|
Posts: 61
|
tried that adam but no luck, i was wondering would it be that the page cant find my dsn?
|
|
|
|
06-06-2006, 05:56 PM
|
Re: ADODB.Recordset error
|
Posts: 317
Name: This Space for Rent
Location: Georgia
|
Did you upload the database? According to the connection string, I should be able to download your database by following this link
Code:
http://www.petsnco.com/db/Petwise.mdb
but its not there.
__________________
Please login or register to view this content. Registration is FREE
"I think therefore I am, I think." <!-- George Carlin
|
|
|
|
06-06-2006, 06:41 PM
|
Re: ADODB.Recordset error
|
Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
|
It won't be
The ../db/ means it is in a folder above the website root
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|
|
|
|
06-06-2006, 06:50 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
Exactly.
If the file wasn't found, you'd get an error message saying as such.
|
|
|
|
06-06-2006, 06:56 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
redgeordieboy: what happens when you do this?
Code:
Set rsViewProds = Server.CreateObject("ADODB.Recordset")
rsViewProds.ActiveConnection = MM_Petwise_STRING
rsViewProds.CursorLocation =3
rsViewProds.LockType = 3
rsViewProds.Open "SELECT * FROM [Product] ORDER BY [ProdID]"
Failing that, try replacing the query with "Select * from [Product]".
And if that don't work, well sir, you got me.
|
|
|
|
06-07-2006, 06:09 AM
|
Re: ADODB.Recordset error
|
Posts: 61
|
thanks for all the help guys , its working fine now i played around with the DSN, i think now i need to start learning asp properly without relying on dreamweaver to create the code for me
|
|
|
|
06-07-2006, 12:28 PM
|
Re: ADODB.Recordset error
|
Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
|
A very good idea if I ever heard one. 
|
|
|
|
|
« Reply to ADODB.Recordset error
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|