Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 424
  • Last Modified:

dreamweaver godaddy asp database configuration

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
dsr-websitech
Asked:
dsr-websitech
  • 10
  • 9
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
Your code will not work on Godaddy.  They require the fileDSN method I showed above.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
What are you trying to fill in?  Can you show me that file (with username and password blanked out)?
0
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
dsr-websitechAuthor Commented:

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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
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
 
Dave BaldwinFixer of ProblemsCommented:
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
 
dsr-websitechAuthor Commented:
Great, I'll post results tomorrow.

Thanks

David
0
 
Jason C. LevineNo oneCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

  • 10
  • 9
Tackle projects and never again get stuck behind a technical roadblock.
Join Now