Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 December 7th, 2004, 04:35 AM
Authorized User
 
Join Date: Dec 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default connection problem

Hi I am trying to open a connection. code is as follows
<object RUNAT="SERVER" ID="conn"PROGID="ADODB.Connection"></object>
<% conn.Open Application("ConnectionString") %>
The error is as follows:
Microsoft OLE DB Provider for SQL Server: [DBNETLIB][ConnectionRead (Error SIO_KEEPALIVE_VALS()).]General network error. Check your network documentation.
I really dont know what is this object id in asp page. for debugging purpose I have created new application in VS.NET and added all the files and when I run i get this error. Please help. I have not added any code in Global.asax and web.config. The SQL server is on different machine and I could open connection using normal ASP and ASP.NET projects but only this <OBJECT> tag could not open connection I dont know the theory behind it. Your help will be appreciated. Please....


bdl
__________________
bdl
 
Old December 7th, 2004, 09:16 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Just curious, why are you using OLE DB for SQL Server?

 
Old December 7th, 2004, 11:00 AM
Authorized User
 
Join Date: Dec 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I dont know why am I using OLE DB for SQL server because this application was created by someone else that I am trying to debug in VS.NET. I am new to .NET. Can we change OLEDB to ADO DB, is there any default setting in .net to change or config?

bdl
 
Old December 7th, 2004, 11:52 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Can you post more of your code?

 
Old December 7th, 2004, 01:27 PM
Authorized User
 
Join Date: Dec 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Here is my first two lines of code in my asp page which is giving trouble from my local server.
<object RUNAT="SERVER" ID="conn" PROGID="ADODB.Connection"></object>
<% conn.Open Application("ConnectionString") %>
This file is working OK on the live server. But I have copied all the asp website to local server and created a new ASP.NET web application in VS.NET and trying to run locally by connecting to the SQL server remotly. First it gives file not found..even though the file functions.asp is there in virtual directory ..after I copied the file in default ans change include virtual to include file then I got the OLE BD error that I posted earlier. The same application I have tried in my laptop local server whenre SQL server is local on my laptop, then it worked...So there is something with the connection to the SQL server which is not local..The same server using .NET code I can connect but that code is not object..what is this OBJECT in this asp.file???that I dont know..Please help..

bdl
 
Old December 7th, 2004, 01:46 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,110
Thanks: 0
Thanked 3 Times in 3 Posts
Default

"functions.asp"

"created a new ASP.NET web application in VS.NET"

You don't want to mix the technologies. If you are going to use ASP.NET, I recommend that you rewrite your classic ASP to ASP.NET.

 
Old December 7th, 2004, 02:14 PM
Authorized User
 
Join Date: Dec 2004
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi STU but that site is big application i cant write that in asp.net but I just want to debug and know ehre the problem exists if there is any in the future.i understand your advise but I just want to dubug. Opening a connection should be fine I just want to open connection. But how come the same code works on different system with VS.NET..)(the only difference is SQL server is local to the machine that works)..

bdl





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection problem atzplzw Classic ASP Databases 3 November 15th, 2004 03:53 AM
Problem with the connection! Berni016x SQL Server 2000 2 November 9th, 2004 08:51 AM
PROBLEM IN CONNECTION Abhinav_jain_mca SQL Server 2000 5 September 30th, 2004 09:32 AM
Problem With Connection ! huyremy VB Databases Basics 2 September 29th, 2004 03:37 AM
connection problem weihoe2004 VS.NET 2002/2003 1 July 10th, 2004 01:46 PM





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