Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Database Connection

Status
Not open for further replies.

gio2888

Technical User
Oct 26, 2000
64
US
Hello, I have this error on my rs.open line.

Microsoft ADO/RDS error '800a1004'
Business object cannot be created.

Heres the code on how I connect to the DB.

<%


Set RS = Server.CreateObject(&quot;ADODB.RecordSet&quot;)

set conn = Server.CreateObject(&quot;ADODB.Connection&quot;)
conn.open &quot;Provider=MS Remote;&quot; &_
&quot;Remote Server=\\sr23redpoll;&quot; &_
&quot;Remote Provider=Microsoft.Jet.OLEDB.4.0;&quot; &_
&quot;DataSource=\\sr11hawk\shared\Vanity_Share\WebTemplates\departments\cg\community IS\database\Equipment.mdb;&quot;




sql = &quot;select * from site&quot;

rs.open sql, conn, 1, 1


PS: HELP!!! Stuck on this for a long long time!
Thank you!
 
Could it be that you need some extra dll's or something installing? Maybe you could review the package and deployment wizard?
 
I am so sorry to tell you that I have no control on the server, I am only an intern. All I need to do is find some way to host a DB on some computer, but viewing its data on the webpage.
 
gio2888,

I f you have no control over that server, you might need permissions to access that file and directory too.

fengshui_1998
 
Can I get some more hints? Also there are no login or pwd for the DB...
 
This is an attempt to use RDS (Remote Data Service) over DCOM. This means you will need to have DCOM connectivity to the remote server, as well as have the ADISAPI component installed at the server. The latter is an IIS extension &quot;stub&quot; to make IIS handle your database requests and open the actual database and fiddle with it.

RDS was previously &quot;sold&quot; as a way to give web-client code access to databases on a remote server - via DCOM or HTTP. As various cracker exploits became clear, it was &quot;sold&quot; only for intranet use - too dangerous to expose to the public internet.

Very rarely did anybody ever use it from ASP, that'd be pretty exotic. RDS has pretty much been replaced by SOAP. It is almost like you are &quot;wishing&quot; Access to be a true client/server database like SQL Server or Oracle or something.

These days RDS is generally not installed or is left crippled to save box-jockeys (&quot;system administrators&quot;) the trouble of policing its secure use. Various &quot;IIS lockdown kits&quot; have been put out, and I believe all of them disable or de-install RDS.

In your case, for low-performace ASP applications people relying on .MDBs usually put the database right into the virtual directory housing the ASP app... or a subdirectory of the vdir. Of course you still need to deal with permissions.

Even FrontPage will create a Jet database like this for you in a web if you use its simple forms-to-database stuff.

For real work you'd need to discard Access and Jet, but it may be fine for what you want to do.


But what is really scary is that it appears that your Access DB is sitting over on yet another file server or something. Performance is gonna bite bigtime if you have to do this. Jet will need to haul and thrash a lotta stuff over the wire to/from that file server. It is NOT made for this.

But to let all that go, and just make your stuff &quot;work&quot; I suspect you can just deep-six that RDS stuff: you don't need all that Remote Provider stuff. Just use the Jet Provider.

I see something like:
Code:
<User>--http--<IIS box X>--dcom--<sr23redpoll>--smb--<sr11hawk>
If &quot;box X&quot; is actually &quot;sr23redpoll&quot; and your ASP pages run in sr23redpoll you clearly have no need for RDS.
Code:
<User>--http--<sr23redpoll>--smb--<sr11hawk>
Your ASP and the Jet engine will run in sr23redpoll, and Jet will have to thrash stuff over the file sharing protocol and the wire (a lot of stuff) to get to the &quot;database&quot; (which Access really ain't - more like an ISAM file) sitting over on sr11hawk. But it'll work, though scalability is poor and depending on your network topology and utilization things could get really yucky.

So if X is sr23redpoll, try sumpin' like:
Code:
conn.open &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; & _
          &quot;DataSource=\\sr11hawk\shared\Vanity_Share\&quot; & _
              &quot;WebTemplates\departments\cg\&quot; & _
              &quot;community IS\database\Equipment.mdb;&quot;
But keep in mind that the user context your ASP pages run under will need access to this file on the sr11hawk file server.

If X is NOT sr23redpoll (my 1st stick drawing), then sr23redpoll must be an IIS server with the server-side RDS components installed and enabled, and X must be able to &quot;see&quot; sr23redpoll over DCOM (unless you switch to using HTTP). You also need user/pw authentication set up on the server and put into your connection on Open. This is gonna be messy - it is so little used even the docs on MSDN Online have myriad typos nobody cares to correct.

And...

In EITHER case (separate X or X = sr23redpoll) your sr23redpoll needs to be able to see through any intervening firewalls over MS SMB file sharing (or whatever file-sharing you use... Novell? Banyan? :p) to that file server sr11hawk.

Good luck. Hopefully others will point out where I went completely off the trolley here.
 
BTW -

Next time try posting this sort of thing over in the ASP Forum. You might get a quicker, shorter, sweeter answer. This isn't a VBScript issue, more of an ASP or an ADO or OLEDB question.

Good luck!
 
Thanks for your help. I tried the

conn.open &quot;Provider=Microsoft.Jet.OLEDB.4.0;&quot; & _
&quot;DataSource=\\sr11hawk\shared\Vanity_Share\&quot; & _
&quot;WebTemplates\departments\cg\&quot; & _
&quot;community IS\database\Equipment.mdb;&quot;

approach, but I got an error

&quot;Could not find installable ISAM.&quot;

Any other ways I can get it to connect.
 
Thank you so very much, it works now!

DataSource should be Data Source

And my DB was created by an older version of Access...so I coverted by Access 2000 and now everything works fine, and I thought the code was wrong or that the Provider wasn t set up on the server. I was so frustrated!!!! CS what are fun and exciting field. you can be frustrated on something for days only to find out that the problem is so trivial that it can be fixed in seconds!!!! Goodthing we have a community like this...thank you all!

Wayne
 
Sorry Wayne,

I should have seen that myself. Doh!

So you WERE able to skip all that RDS jazz after all right?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top