Solved

dreamweaver godaddy asp database configuration

Posted on 2010-11-28
21
404 Views
Last Modified: 2012-05-10
Hi, I'm new to Exper Exchange and this is my first post.

I'm trying to figure out a way to configure a dynamic website that works locally on
IIS7, but I need it to work in Godaddy share hosting.
Right now I am able to see the categories.asp page locally, but when looking at the Godaddy I get the error below.

with godaddy use this connection string: A) MM_mydsn_STRING = "dsn=access_nationalEx.dsn;uid=admin;pwd=12345;"
With the local web server : B) MM_connNationalEx_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\miamiviews\access_db\nationalEx.mdb"

this is the error I'm getting now:

ADODB.Recordset error '800a0bb9'
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/categories.asp, line 15

If anyone can show me the proper configuration to develop both on a localhost and on a share hosting.

I have been looking for a way arround this for few years now.
This is the only reason I can't advance to the next level.


0
Comment
Question by:dsr-websitech
  • 10
  • 9
21 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227712
First, your .mdb must be in the "access_db" directory.  Second, unless they finally changed it, the DSN file is wrong.  The DBQ needs to be a full path as shown below.  Third, I don't think your connection string will work on Godaddy.  The shorter file below is what I use (disguised) to connect with ASP on IIS7 on Godaddy.  I do have this working with my own version of these files.
[ODBC]
DRIVER=Microsoft Access Driver (*.mdb)
UID=abcdefgh
PWD=a1b2c3d4
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=D:\Hosting\1234567\html\access_db
DBQ=D:\Hosting\1234567\html/access_db/YourAccess.mdb

Open in new window

'file dsn and connect string
dsn_name = "YourAccess.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name

Open in new window

0
 

Author Comment

by:dsr-websitech
ID: 34227751
this is what workes locally

<%
' FileName="Connection_ado_conn_string.htm"
' Type="ADO"
' DesigntimeType="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
Dim MM_connNationalEx_STRING

Then: I have tried all this strings:

1) MM_mydsn_STRING = "dsn=access_nationalEx.dsn;uid=admin;pwd=15432;"
3) sDSN = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\hosting\mmariana01\access_db\nationalEx.mdb

%>

this one works locally, but I need it to work on the web, you know, otherwise I wasting my time.

2)MM_connNationalEx_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\inetpub\wwwroot\miamiviews\access_db\nationalEx.mdb"
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227757
Your code will not work on Godaddy.  They require the fileDSN method I showed above.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:dsr-websitech
ID: 34227768
ok, sorry I don;'t have any formal training and I don't get your code.

I tried filling the blanks but :

Microsoft VBScript compilation error '800a0401'

Expected end of statement

/Connections/connNationalEx.asp, line 14

DRIVER=Microsoft Access Driver (NationalEx.mdb.mdb)
-----------------^
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227791
What are you trying to fill in?  Can you show me that file (with username and password blanked out)?
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227793
By the way, you will not be able to use the same connection string and DSN on your local server and Godaddy.  Godaddy's methods are unique to them as far as I know.
0
 

Author Comment

by:dsr-websitech
ID: 34227821
this is what I pasted and nothing:

<%[ODBC]
DRIVER=Microsoft Access Driver (nationalEx.mdb)
UID=admin
PWD=15432
UserCommitSync=Yes
Threads=3
SafeTransactions=0
PageTimeout=5
MaxScanRows=8
MaxBufferSize=2048
FIL=MS Access
DriverId=25
DefaultDir=D:\hosting\mmariana01\access_db\
DBQ=D:\Hosting\mmariana01\html/access_db/nationalEx.mdb
 

dsn_name = "dsn=access_nationalEx.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
 

%>


0
 

Author Comment

by:dsr-websitech
ID: 34227859

Using the Goddaddy guide
http://community.godaddy.com/help/259/connecting-to-an-access-database-using-file-dsn-and-aspado

my result was this

PRODNAME: Alien Autopsy I Video PRODNAME: Alien Autopsy II Video PRODNAME: Alien Autopsy III Video PRODNAME: Alien Autopsy IV Video PRODNAME: Alien Autopsy VII Video PRODNAME: J. Lo's Unread Newspaper PRODNAME: Crop Ovals and Other Lesser Know Alien Visitations PRODNAME: Plaster Impression of Saskwatch Footprint PRODNAME: Real Dinosaur Egg PRODNAME: Alien-Thought Disrupting Hat PRODNAME: National Exasperator Baseball Cap PRODNAME: Ben Affleck Shirt PRODNAME: National Exasperater Hat PRODNAME: National Exasperater T-Shirt PRODNAME: Alien Abduction T-Shirt PRODNAME: Big Foot T PRODNAME: Alien Love T-Shirt PRODNAME: Paparazzi Memories PRODNAME: Tom Cruise's Sunglasses PRODNAME: My Son, the Oyster PRODNAME: World's Largest Shark Tooth

ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/categories.asp, line 15
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227867
Sorry, I think I confused things for you a little.  The first part was the 'dsn' file that you find in "\_dsn" that Godaddy got wrong when I put my site up.  The attached file should be the connection file.  Let me know if this works.  If it doesn't, let me know what the error is and maybe we'll take a look at the 'dsn' file.
<%
dsn_name = "access_nationalEx.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
' oConn can be whatever you are already using
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
%>

Open in new window

0
 

Author Comment

by:dsr-websitech
ID: 34227893
ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/categories.asp, line 15


this is the top portion of my categories.asp page. it works locally.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/connNationalEx.asp" -->
<%
Dim rsProducts__MMColParam
rsProducts__MMColParam = "1"
If (Request.QueryString("categoryID") <> "") Then
  rsProducts__MMColParam = Request.QueryString("categoryID")
End If
%>
<%
Dim rsProducts
Dim rsProducts_numRows

Set rsProducts = Server.CreateObject("ADODB.Recordset")
rsProducts.ActiveConnection = MM_connNationalEx_STRING
rsProducts.Source = "SELECT prodID, prodName, prodPrice, prodInventory, categoryName  FROM products, category  WHERE (products.categoryID = " + Replace(rsProducts__MMColParam, "'", "''") + ") and (category.categoryID = " + Replace(rsProducts__MMColParam, "'", "''") + ")  ORDER BY prodName ASC"
rsProducts.CursorType = 0
rsProducts.CursorLocation = 2
rsProducts.LockType = 1
rsProducts.Open()

0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227915
That page you linked is the right info.  You did get results so I think you actually have the connection right.  Should there be more results or was that all that's in the database?
0
 

Author Comment

by:dsr-websitech
ID: 34227920
no, I got an error after using this connection string

<%
dsn_name = "access_nationalEx.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
' oConn can be whatever you are already using
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
%>
 


ADODB.Recordset error '800a0bb9'

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

/categories.asp, line 15

0
 

Author Comment

by:dsr-websitech
ID: 34227927
Do I have to modify any part of this code ?

<%
dsn_name = "access_nationalEx.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
' oConn can be whatever you are already using
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
%>
 
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34227961
Yes, I hadn't seen your other code so you don't need the last lines.  For test purposes, I would simplify your SQL to simple SELECT statement.  This line may need to be:

rsProducts.ActiveConnection = connectstr
<%
dsn_name = "access_nationalEx.dsn"
sDSNDir = Server.MapPath("\_dsn")
connectstr = "filedsn=" & sDSNDir & "\" & dsn_name
%>

Open in new window

0
 

Author Comment

by:dsr-websitech
ID: 34227994
no luck.
I'm willing to try anything to get this working.
the problem is that no one has published any example that works with godaddy or other, everything is theory no practical examples.

Thanks , let me know if you have any other ideas.

I'm even willing to give out the ftp info...
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 500 total points
ID: 34228081
Don't give out the FTP info.  The examples I gave are working right now on Godaddy though you may be using one or two things differently.  The file below is working right now on my Godaddy account (with my info).  I have put in your info from your posts above.  Save it as 'test.asp' and let me know if there are any errors.  Also tell me what they are.
<%@ LANGUAGE = VBScript %>
<%  Option Explicit		%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>Godaddy Access test page</title>
</head>
<body>
<h1>Godaddy Access test page</h1>
<%
Dim oConn, oRs
Dim qry, connectstr, sDSNDir
Dim db_name, db_username, db_userpassword
Dim dsn_name, fieldname, tablename
' This is your for database and connection 
dsn_name = "access_nationalEx.dsn"
fieldname = "prodName"
tablename = "products"

'assumes that _dsn exists in the root
sDSNDir = Server.MapPath("\_dsn")

connectstr = "filedsn=" & sDSNDir & "\" & dsn_name

'Response.Write connectstr & "<br><br>"

Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open connectstr
qry = "SELECT * FROM " & tablename

Set oRS = oConn.Execute(qry)

if not oRS.EOF then
while not oRS.EOF
response.write ucase(fieldname) & ": " & oRs.Fields(fieldname) & " "
oRS.movenext
wend
oRS.close
end if

Set oRs = nothing
Set oConn = nothing

%>



</body>
</html>

Open in new window

0
 

Author Comment

by:dsr-websitech
ID: 34228099
I get this
Godaddy Access test page
PRODNAME: Alien Autopsy I Video PRODNAME: Alien Autopsy II Video PRODNAME: Alien Autopsy III Video PRODNAME: Alien Autopsy IV Video PRODNAME: Alien Autopsy VII Video PRODNAME: J. Lo's Unread Newspaper PRODNAME: Crop Ovals and Other Lesser Know Alien Visitations PRODNAME: Plaster Impression of Saskwatch Footprint PRODNAME: Real Dinosaur Egg PRODNAME: Alien-Thought Disrupting Hat PRODNAME: National Exasperator Baseball Cap PRODNAME: Ben Affleck Shirt PRODNAME: National Exasperater Hat PRODNAME: National Exasperater T-Shirt PRODNAME: Alien Abduction T-Shirt PRODNAME: Big Foot T PRODNAME: Alien Love T-Shirt PRODNAME: Paparazzi Memories PRODNAME: Tom Cruise's Sunglasses PRODNAME: My Son, the Oyster PRODNAME: World's Largest Shark Tooth
0
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 34228135
Looks to me like it works then.  You are using different methods in your original file than I am so you can keep my file as a reference and modify your other file(s) until it works as you want.
0
 

Author Comment

by:dsr-websitech
ID: 34228148
Great, I'll post results tomorrow.

Thanks

David
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34830221
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ASP SQL Syntax Duplicate Key 7 113
Time Conversions...both ways 2 22
Code Manager | Snippits 2 59
Record locking on classic ASP 3 35
I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question