Wrox Programmer Forums
|
ASP E-commerce As of Oct 5, 2005, this forum is now locked. No posts have been deleted. Please use "Classic ASP Professional" at: http://p2p.wrox.com/forum.asp?FORUM_ID=56 for discussions similar to the old ASP Pro Code Clinic or one of the other many remaining ASP and ASP.NET forums here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP E-commerce section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 10th, 2003, 03:27 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default about Proffesional ASP 3.0 Chapter 08

Hi!
I have some problem on chapter 08 from book
Proffesional Active Server Pages 3.0
I type default.asp then click to one of two links
*Using the Connection Object
That give me links to another default.asp page which is
in connection folder. There are two files, defalut.asp
and Connection.asp
I click on "Create a Connection Object" and I got
these msg:
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNMPNTW]Specified SQL server not found.
/wrox/Chapter 08/Connection/Connection.asp, line 23

I checked file Connection.asp line 23 and there are:
"conPubs.Open strconn"

I didnt see any specific information what should i do
before try that example. Is there anything i missed to make
that example works?
Any help will appreciated!
 
Old June 11th, 2003, 10:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

At some point, (I don't have the book handy) you are told to define the sqlserver name. Check where strConn is defined and make sure the name of YOUR sqlserver is in there.



Hal Levy
Daddyshome, LLC
 
Old June 11th, 2003, 03:52 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks, but i am not so sure sqlserver name is a problem. These are
example codes:

<%
Dim conPubs

Set conPubs = Server.CreateObject("ADODB.Connection")

conPubs.Open strConn

If ConPubs.State = adStateOpen Then
   Response.Write "Connection to " & conPubs.DefaultDatabase & " created succeassfully"
else
   Repsonse.Write "Connection failed"
end if

conPubs.Close

set conPubs = Nothing

%>
 
Old June 11th, 2003, 07:30 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

Again,

in your sample you put:
Code:
conPubs.Open strConn
strConn is defined somewhere. Your problem is with the contents of strConn. It's not pointing at your database server.

Hal Levy
Daddyshome, LLC
 
Old June 13th, 2003, 04:39 PM
Registered User
 
Join Date: Jun 2003
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you got the point Hal!
I just checked chapter 08 and there is two file. one is default.asp,
second which have definition of strConn Connection.asp These are codes of connection.asp:
<% strConn = "Provider=SQLOLEDB; Data Source=WATCHER; " & _
            "Initial Catalog=pubs; User Id=davids; Password=whiskey"
%>
I create in sql 7.0 database named WATCHER, but something is still wrong.
I got same message. Anyway, i know whats wrong thank you for your help





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 6 of Proffesional JMS aravind_prasanna All Other Wrox Books 0 March 5th, 2005 02:43 AM
Beginning Visual C# Exercises - Chapter 08 seblake C# 2 July 26th, 2004 07:11 AM
Proffesional ASP XML Book- Help with error Pattri Classic ASP XML 0 April 28th, 2004 12:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.