Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 04-02-2005, 10:13 PM   #1 (permalink)
awieds
Registered User
 
Join Date: Mar 2005
Posts: 42
awieds is on a distinguished road
Connect to Access Database

I am using Dreamweaver MX and an Access 2002 database. I have already created the tables and I need to connect. For some reason I am having difficulty connecting. Can anyone help me out?
I created a connection string but when I test I get the following error:
If I select Using driver on this machine, I get the error 'Could not find installabla ISAM'
If I select Using driver on testing server then I get the error: '1)There is no testing server running on the server machine. 2) The testing server specified for this site does not map to the http://localhost/_mmserverscripts/MMHTTPDB.asp URL. Verify that the URL prefix maps to the root of the site.'
I really don't understand but I need to get this running. Csn someone help me out?
Thanks
awieds is offline   Reply With Quote
Old 04-02-2005, 11:00 PM   #2 (permalink)
awieds
Registered User
 
Join Date: Mar 2005
Posts: 42
awieds is on a distinguished road
Ok, I got my database to connect when I hit test. But that is only locally. Hoe do I connect to it on the server?

Thanks
awieds is offline   Reply With Quote
Old 04-03-2005, 01:45 AM   #3 (permalink)
awieds
Registered User
 
Join Date: Mar 2005
Posts: 42
awieds is on a distinguished road
Ok, I got it to work. When I did a simple query the connection works and everything is fine. However I ran the following query:
"SELECT ContentsOfBox.*, ProductDescription.*, ProductFeatures.*, Title.*, Products.ProductID FROM (((Products INNER JOIN ContentsOfBox ON Products.ProductID = ContentsOfBox.ProductID) INNER JOIN ProductDescription ON Products.ProductID = ProductDescription.ProductID) INNER JOIN ProductFeatures ON Products.ProductID = ProductFeatures.ProductID) INNER JOIN Title ON Products.ProductID = Title.ProductID WHERE (((Products.ProductID)=1))"

When I run the query is Access it is fine. However when I run it from my asp code my recordset is empty.
ANy suggestions?
Thanks
awieds is offline   Reply With Quote
Old 04-03-2005, 09:01 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,446
sde is on a distinguished road
it would probably do you better if you posted the related asp code. i'm gonna go ahead and move this to the asp forum.

rdove is our asp expert around here .. hopefully he'll stop by
__________________
Mike
sde is offline   Reply With Quote
Old 04-09-2005, 11:27 PM   #5 (permalink)
awieds
Registered User
 
Join Date: Mar 2005
Posts: 42
awieds is on a distinguished road
The following is my asp code. It works fine on one page.

sub GetData(prod)
strQuery="Select * from contentsofbox where productid=" & prod
rs.Open strQuery, MM_myConn_STRING, 0, 2 ,1
contentDesc=rs("Description")
contentInc=rs("Includes")
UtWt=rs("UnitWeight")
UtPckg=rs("UnitPckg")
colors=rs("colors")
pckgDetails=rs("Packaging")
rs.close()
Set rs = Nothing
end sub


It works fine on one page (I pass 1 as prod). The I use it on another page where I pass 10 as prod. I am getting an error either BOF or EOF is true for
contentDesc=rs("Description")

However when I run the query in Access query builder it works fine and it returns data! So the rs can't be empty. What am I doing wrong?
Thanks!
awieds is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqladmin: connect to server at 'localhost' failed infinite_root PHP 3 04-30-2004 06:50 AM
Access denied for user: '@192.168.0.71' (Using password: NO) infinite_root PHP 11 04-28-2004 05:30 PM
Methods of moving a database... DarkTwilkitri PHP 8 11-19-2003 05:02 AM


All times are GMT -8. The time now is 04:45 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting