Ask a Question related to ASP Database, Design and Development.
-
w i l l #1
database error.... plz explain..
I'm new at ASP. I'm trying to access some info out of an access
database and i get this error. I've set up the ODBC correctly (I
think), so I'm not sure what's causing this error...Any Ideas would be
appreciated.
w i l l
-----ERROR------
Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
1.
/asp/database.asp, line 20
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
Page:
GET /asp/database.asp
-----ERROR---------
CODE-------------------------------BELOW-----------------
<%@ LANGUAGE="JavaScript" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>database.asp</title>
</head>
<body>
<table border="1">
<tr>
<th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</th>
</tr>
<%
var adoConnection = Server.CreateObject("ADODB.Connection");
adoConnection.Open("DSN=Address");
var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
var adoRecordSet = adoConnection.Execute(SQL);
while (adoRecordSet.Eof == false) {
%>
<tr>
<td><%=adoRecordSet("ID").Value%></td>
<td><%=adoRecordSet("Name").Value%></td>
<td><%=adoRecordSet("Address").Value%></td>
<td><%=adoRecordSet("City").Value%></td>
<td><%=adoRecordSet("Zip").Value%></td>
<td><%=adoRecordSet("Phone").Value%></td>
</tr>
<%
adoRecordSet.MoveNext();
//Close Record Set
ado.RecordSet.Close();
adoRecordSet = null;
adoConnection.Close();
adoConnection = null;
}
%>
</table>
</body>
</html>
w i l l Guest
-
Error after upgrade "Error Executing Database Query. "
I have set up a new server with CF MX 6.1. I have moved code from a CF 5 server. Now I am getting a lot of errors like this one. They all vary... -
Hard to explain, has to do with users, last logged intime, and my database
Okay everyone this is closly related to my other topic but they are different. I keep a field in my database called loggedin, which is set to yes if... -
Can someone explain this error to me? :(
Hi! I can`t understand what php wants from me:( So: Cannot send session cache limiter - headers already sent (output started at... -
Can Someone Explain (No Pun Intended) this Explain Plan Output ?
We're running DB2 v7.1 on OS/390. The DBA guys gave us a macro to generate an explain plan against a query that is stored in a PDS member. The... -
Searching a database .... query optimization (how do I read the explain on output?)
I've got a more-or-less open search of the database in question, which works just fine, if you don't mind the upwards of 20+ seconds it takes to... -
Tim Williams #2
Re: database error.... plz explain..
Consider renaming some of your table fields:
[url]http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q109/3/12.asp&NoWebContent=1[/url]
tim
"w i l l" <willis_31_40@yahoo.com> wrote in message
news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...<th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</> I'm new at ASP. I'm trying to access some info out of an access
> database and i get this error. I've set up the ODBC correctly (I
> think), so I'm not sure what's causing this error...Any Ideas would be
> appreciated.
>
> w i l l
>
> -----ERROR------
> Technical Information (for support personnel)
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
> 1.
> /asp/database.asp, line 20
>
>
> Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
>
> Page:
> GET /asp/database.asp
>
> -----ERROR---------
>
>
> CODE-------------------------------BELOW-----------------
>
> <%@ LANGUAGE="JavaScript" %>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>database.asp</title>
> </head>
> <body>
>
> <table border="1">
> <tr>
>
>
th>> </tr>
>
> <%
> var adoConnection = Server.CreateObject("ADODB.Connection");
> adoConnection.Open("DSN=Address");
> var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
> var adoRecordSet = adoConnection.Execute(SQL);
> while (adoRecordSet.Eof == false) {
> %>
>
> <tr>
> <td><%=adoRecordSet("ID").Value%></td>
> <td><%=adoRecordSet("Name").Value%></td>
> <td><%=adoRecordSet("Address").Value%></td>
> <td><%=adoRecordSet("City").Value%></td>
> <td><%=adoRecordSet("Zip").Value%></td>
> <td><%=adoRecordSet("Phone").Value%></td>
> </tr>
>
> <%
> adoRecordSet.MoveNext();
>
> //Close Record Set
> ado.RecordSet.Close();
> adoRecordSet = null;
> adoConnection.Close();
> adoConnection = null;
> }
> %>
>
> </table>
> </body>
> </html>
>
Tim Williams Guest
-
Tammy B. #3
Re: database error.... plz explain..
Make sure that IIS user has permission to the folder that has the access
database
"w i l l" <willis_31_40@yahoo.com> wrote in message
news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...<th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</> I'm new at ASP. I'm trying to access some info out of an access
> database and i get this error. I've set up the ODBC correctly (I
> think), so I'm not sure what's causing this error...Any Ideas would be
> appreciated.
>
> w i l l
>
> -----ERROR------
> Technical Information (for support personnel)
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
> 1.
> /asp/database.asp, line 20
>
>
> Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
>
> Page:
> GET /asp/database.asp
>
> -----ERROR---------
>
>
> CODE-------------------------------BELOW-----------------
>
> <%@ LANGUAGE="JavaScript" %>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>database.asp</title>
> </head>
> <body>
>
> <table border="1">
> <tr>
>
>
th>> </tr>
>
> <%
> var adoConnection = Server.CreateObject("ADODB.Connection");
> adoConnection.Open("DSN=Address");
> var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
> var adoRecordSet = adoConnection.Execute(SQL);
> while (adoRecordSet.Eof == false) {
> %>
>
> <tr>
> <td><%=adoRecordSet("ID").Value%></td>
> <td><%=adoRecordSet("Name").Value%></td>
> <td><%=adoRecordSet("Address").Value%></td>
> <td><%=adoRecordSet("City").Value%></td>
> <td><%=adoRecordSet("Zip").Value%></td>
> <td><%=adoRecordSet("Phone").Value%></td>
> </tr>
>
> <%
> adoRecordSet.MoveNext();
>
> //Close Record Set
> ado.RecordSet.Close();
> adoRecordSet = null;
> adoConnection.Close();
> adoConnection = null;
> }
> %>
>
> </table>
> </body>
> </html>
>
Tammy B. Guest
-
John Blessing #4
Re: database error.... plz explain..
"w i l l" <willis_31_40@yahoo.com> wrote in message
news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...> I'm new at ASP. I'm trying to access some info out of an access
> database and i get this error. I've set up the ODBC correctly (I
> think), so I'm not sure what's causing this error...Any Ideas would be
> appreciated.
>
" (I think)" makes me suspect that you might not have set it up correctly.
Using ODBC is a bad idea anyway, use a dsn-less connection instead:
"Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\yourfolder\yourdb.mdb;Persist Security Info=False"
--
John Blessing
[url]http://www.LbeHelpdesk.com[/url] - Help Desk software at affordable prices
[url]http://www.free-helpdesk.com[/url] - Completely free help desk software !
[url]http://www.lbetoolbox.com[/url] - Remove Duplicates from MS Outlook
[url]http://www.lbesync.com[/url] - Synchronize two Outlook Personal Folders
John Blessing Guest
-
Aaron Bertrand [MVP] #5
Re: database error.... plz explain..
I agree with John, don't use a DSN. And try wrapping column names in
[square brackets] since you are using at least one that is reserved...
[url]http://www.aspfaq.com/2080[/url]
--
Aaron Bertrand, SQL Server MVP
[url]http://www.aspfaq.com/[/url]
Please reply in the newsgroups, but if you absolutely
must reply via e-mail, please take out the TRASH.
"w i l l" <willis_31_40@yahoo.com> wrote in message
news:kbtbgvkt31qjhch6v90nqhqjs4mfor0fnu@4ax.com...<th>ID</th><th>Name</th><th>Address</th><th>City</th><th>Zip</th><th>Phone</> I'm new at ASP. I'm trying to access some info out of an access
> database and i get this error. I've set up the ODBC correctly (I
> think), so I'm not sure what's causing this error...Any Ideas would be
> appreciated.
>
> w i l l
>
> -----ERROR------
> Technical Information (for support personnel)
>
> Error Type:
> Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
> [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected
> 1.
> /asp/database.asp, line 20
>
>
> Browser Type:
> Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)
>
> Page:
> GET /asp/database.asp
>
> -----ERROR---------
>
>
> CODE-------------------------------BELOW-----------------
>
> <%@ LANGUAGE="JavaScript" %>
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <html>
> <head>
> <title>database.asp</title>
> </head>
> <body>
>
> <table border="1">
> <tr>
>
>
th>> </tr>
>
> <%
> var adoConnection = Server.CreateObject("ADODB.Connection");
> adoConnection.Open("DSN=Address");
> var SQL = "SELECT ID,Name,Address,City,Zip,Phone FROM addressTable";
> var adoRecordSet = adoConnection.Execute(SQL);
> while (adoRecordSet.Eof == false) {
> %>
>
> <tr>
> <td><%=adoRecordSet("ID").Value%></td>
> <td><%=adoRecordSet("Name").Value%></td>
> <td><%=adoRecordSet("Address").Value%></td>
> <td><%=adoRecordSet("City").Value%></td>
> <td><%=adoRecordSet("Zip").Value%></td>
> <td><%=adoRecordSet("Phone").Value%></td>
> </tr>
>
> <%
> adoRecordSet.MoveNext();
>
> //Close Record Set
> ado.RecordSet.Close();
> adoRecordSet = null;
> adoConnection.Close();
> adoConnection = null;
> }
> %>
>
> </table>
> </body>
> </html>
>
Aaron Bertrand [MVP] Guest



Reply With Quote

