Connect ASP page to SQL Table


I am completely new to ASP and I am trying to make an SQL connection from a html page to a SQL 2008 database

database name is Exchange

table name is Report

Here is what I have so far but I don't get anyting when I click on the the query.html file






MS Exchange Report

Testing Phase





[Code]

Posted On: Saturday 10th of November 2012 04:08:32 AM Total Views:  60
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




1 file for connection to db

, I am new to sql 2000 server & asp classic. And I have been teaching myself how to program in this language and how to use sql 2000. If I had the following line of code to use in 1 db connection file called dsn.asp Code: And I have a script that I downloaded to test how it works etc. And it uses the following to connect to a DB. What would I need to do in order for the below to function with the top only As I want 1 file to be used for all DB connections no matter the script I use. Code: Now throughout the code for this poll3 script there are calls to use OPEN_DB(), MyConn etc. How would I fix this to use the 1 DB connection file instead of using the second option that was included with the poll3 script
VIEWS ON THIS POST

61

Posted on:

Saturday 10th November 2012
View Replies!

Database connection

I'm hosting my website on streamline and I was told that there are only 255 connections allowed per database server(MySQL). Could anyone explain me what does it meas Is that good Thank you
VIEWS ON THIS POST

200

Posted on:

Saturday 10th November 2012
View Replies!

Maximum concurrent remote connections?

It isn't just an issue of how many connections SQL server can handle, it starts becoming an issue of how many connections can SQL server handle running on a particular machine with finite resources. It becomes even worse if that machine is also doing authentication, file sharing, etc. I would be interested in seeing the specs of your servers, and knowing exactly what roles they have. However, for your files sharing, you might want to research Distributed File Sharing on Windows.
VIEWS ON THIS POST

106

Posted on:

Saturday 10th November 2012
View Replies!

SOS!!!how to connect sql200 on win2003 server from win2000 server?

my computer's system is win2000, it can connect sql2000 of another computer(win2000 server) right, but it can't connect sql2000 sp4 of another computer(win2003 server). how to solve this problem
VIEWS ON THIS POST

104

Posted on:

Saturday 10th November 2012
View Replies!

How to connect remote sql server

I want to connect sql server from my home to my sql server at office.I just know dynamic IP.How do i check my ip to connect with sql server at office.PLease,anybody help
VIEWS ON THIS POST

79

Posted on:

Saturday 10th November 2012
View Replies!

Aspx script cannot connect to MSSQL: login failure

, I'm attempting to migrate a website to a new hosting provider. The site uses ASP 2 with an MSSQL database. I'm setting it up on a virtual dedicated server with goDaddy, so I have complete control over all of the settings. I've installed MSSQL Studio 2005 Express along with the Management Studio. I've setup the database server, restored the relevant database, created the necessary users, and modified the login info in the web.config file to reflect the changes. When I access the server via ip in my web browser and try to view index.aspx in the root web directory, I'm given this error: Code: Cannot open database "BDC\SQLEXPRESS" requested by the login. The login failed. Login failed for user '[username]'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "BDC\SQLEXPRESS" requested by the login. The login failed. Login failed for user '[username]'. Source Error: Line 50: myConnection = New SqlConnection(ConfigurationSettings.AppSettings("connName")) Line 51: myCommand = New SqlCommand(pressSQL, myConnection) Line 52: myConnection.Open() Line 53: Line 54: myPR.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection) Source File: [index.aspx] Line: 52 Stack Trace: [SqlException (0x80131904): Cannot open database "BDC\SQLEXPRESS" requested by the login. The login failed. Login failed for user '[username]'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734995 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +33 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +359 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 ASP.include_incpresshome_ascx.BindPressData() in C:\Inetpub\vhosts\baltimoredevelopment.com\httpdocs\include\incPressHome.ascx:52 ASP.include_incpresshome_ascx.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\baltimoredevelopment.com\httpdocs\include\incPressHome.ascx:8 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +13 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +45 System.Web.UI.Control.OnLoad(EventArgs e) +98 System.Web.UI.Control.LoadRecursive() +71 System.Web.UI.Control.LoadRecursive() +154 System.Web.UI.Control.LoadRecursive() +154 System.Web.UI.Control.LoadRecursive() +154 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4315 Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 I'm using the same user name and password combination that I use to login through MSSQL Management Studio. I've also tried every conceivable combination of servername, [machinename\servername, username, [machinename]\username, etc. Here are some of the things that I've checked after reading various help articles: -The user logon that I am using has dbuser,dbwriter, and dbreader access to the relevant database. -I've set the database to allow Windows Authentication and SQL Authentication -The database server is set to allow remote connects for both tcp/ip and named pipes -port 1433 is open and all MSSQL software is set to use that port -I've tried adding users NT AUTHORITY\NETWORK SERVICES and [MACHINENAME]\ASPNET and giving them access to the relevant database -I've tried to add to the web.config file to use a different authentication method The OS is Microsoft Server 2003. here's my web.config file: Code: Any help would be greatly appreciated. I'm totally out of ideas and my hosting provider is offering absolutely no support for the issue. I really need help. Thank you!
VIEWS ON THIS POST

142

Posted on:

Sunday 11th November 2012
View Replies!

Cannot connect to SQLEXPRESS Error:18456

Hai there..please help I am trying to use SQL db first time so i have downloaded MS SQL EXPRESS 2005 and when i am trying to connect using object explorer with SQL Server Authentication mode it shows an error message like: Code: Cannot connect to CPQ..../SQLEXPRESS Login failed for user 'R4u' (Microsoft SQL server error, Error:18456) But i can connect to server using windows authentication mode.. regards...
VIEWS ON THIS POST

74

Posted on:

Sunday 11th November 2012
View Replies!

No connection could be made.. target machine actively refused:solved but can you help

hi, I posted here a little bit ago about the same thing, but wanted to post this message too. I finally got connected to my server (I'm on my laptop and connecting to sql server 2005 on it )... I kept getting messages: " no connection could be made because the target server actively refused it .. " I read that I could try to change my server name to "localhost" so I tried that and it worked. My problem is I don't understand why it worked. Can you point me to some good documentation that explains this for a dummy like myself
VIEWS ON THIS POST

179

Posted on:

Sunday 11th November 2012
View Replies!

An agent to connect Mysql to MsSql

Hi I know that my question may be a little strange but please help me find a way to overcome my problem. I am working with MySql as my Database and I have a lot records that will be added in this Database. But I have a problem! My first DB is in microsoft sql server. some records in my first DB will affect the mySQL. I mean for example when some records add in msSql an agent must change or add some records in mysql. in a better explanation msSql must have the ability to create a connection to a mysql and mysql have to accept this connection and can be affected wih it. this agent can be a trigger running on msSql, but how can I connect to mysql database through this trigger!. well is it possible at all!! if you have any idea or know any way please guide me to solve my problem.
VIEWS ON THIS POST

58

Posted on:

Sunday 11th November 2012
View Replies!

sql server db connection

If my asp files and sql server database are on different server, how can I code the connection statement can I do like this: strConn = "Provider=sqloledb;User ID='id'; pw='pwd'; Data Source=sql server name; Initial Catalog=db name"
VIEWS ON THIS POST

187

Posted on:

Sunday 11th November 2012
View Replies!

[SQL-DOM]You must use SQL Server 2005 management tools to connect to this server

I'm using Microsoft Management Console 2.0 to connect to a newer database. The OS is Windows Server 2003 and the database is SQL Server Standard edition. [SQL-DOM]You must use SQL Server 2005 management tools to connect to this server Can I connect to this database without upgrading the entire server to 2005
VIEWS ON THIS POST

168

Posted on:

Thursday 15th November 2012
View Replies!

OK connecting to sql express, but not sql server 2005

hi, I have sql server express and developer edition of sql server 2005 on my laptop. Why can I connect, using windows authentication, to my express sql server, but not to my other one ( developer)... It gives me the "can't connect to remote servers " error all the time. I don't understand that. Can somebody explain I havent touched any of the security settings. I checked to see if I allow 'remote connections' and I do. I think I still want to use windows authentication, so what should I do to make this work
VIEWS ON THIS POST

152

Posted on:

Thursday 15th November 2012
View Replies!

ODBC Setup - connection error for MS SQL Server Desktop Engine

experts, I'm trying to create a new data source to SQL Server, but failed to do so due to a connection error. MSDE2000A.exe has been installed correctly in the server (local machine). I'm working on this from the Start -> Control Panel -> Administrative Tools -> Data Source (ODBC) -> System DSN. From there, I selected SQL Server and then I was taken to the "Create a New Data Source to SQL Server" wizard. I reckon that the connection error happens because of the server's local machine name inputted in the first screen here (in "Which SQL Server do you want to connect to") I've tried the following server names, and they all failed:- SERVER.DEMO.COM SERVER localmachine [localmachine] localhost [localhost] local [local] Error Message: Code: Connection failed: SQLState: '01000' SQL Server Error: 2 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen(Connect()). Connection failed: SQLState: '08001' SQL Server Error: 17 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. How should I specify the server name correctly Please help me out here.
VIEWS ON THIS POST

139

Posted on:

Thursday 15th November 2012
View Replies!

connecting to postgres database

I am writing an ASP page on my webserver running Windows 2000 Server to connect to a postgres database located on a remote machine running Red Hat Linux 7.3, but how do I connect to the database I have installed the postgres SQL driver on the System DSN through control panel, but now what
VIEWS ON THIS POST

115

Posted on:

Thursday 15th November 2012
View Replies!

Getting error to Connect MS-SQL2005 from remote desktop(using public IP address) connection to DotNet windows application

I have a dot net windows application which can be download from the website. I want to use the database for the application by using public IP address. I am not able to connect SQL server 2005 from remote connection it is giving me the error, SQL server does not allow remote connection. I changed my server remote connection configuration to Local and remote connection using both TCP/IP and named pipes but still i am getting the error. please help me
VIEWS ON THIS POST

342

Posted on:

Monday 19th November 2012
View Replies!

Not associated with a trusted SQL Server connection.

Hi I am trying to make a simple ASP MS SQL connection using the following connection strings oConnection.Open "Provider=SQLOLEDB; Data Source=SYNCHRO_SERVER; Initial Catalog=testDB; User ID=sa; Password=sa" but whenever I run my asp page I always got an error message saying Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. I tried to search the net for solution and most answer I found was saying that I need to change the authentication of SQL Server properties from Windows only to SQL Server and Windows but when I check the configuration of my SQL server its already on SQL Server and Windows and Im still getting same error. Can anyone help me please
VIEWS ON THIS POST

81

Posted on:

Monday 19th November 2012
View Replies!

Trouble connecting to SQL Server EXPRESS

A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) What is missing now I'm trying to use SQL Server EXPRESS on an Amazon Windows Server with IIS and an ASP.NET web site. The following connection string is genererating the following errors that have me currently stumped: connectionString="Data Source=IP-0AF85F31\SQLEXPRESS;Initial Catalog=;Persist Security Info=True;User ID=;password=; Trusted_Connection=False" Login failed for user ''. The user is not associated with a trusted SQL Server connection. [CLIENT: ] Maybe that is enough for someone to help me with the next step to take... Eric
VIEWS ON THIS POST

56

Posted on:

Monday 19th November 2012
View Replies!

Failed to connect to the server

s iam using windows server 2003 on my machine and i have installed sqlserver 2000 and my data base is on the that machine. but i dont know how to configure windows server 2003 so that other computers using xp can connect to it since iam running at network of 25 computers. please help and avail me a stepby step approach of how to go about it.
VIEWS ON THIS POST

152

Posted on:

Monday 19th November 2012
View Replies!

Problem connecting a classic asp to SQLserver 2008 express via IIS7 on win7 64bit

Problem connecting a classic asp project to SQLserver 2008 express with this query strings: conn = "Driver={SQL Server Native Client 10.0}; Server=.\SQLEXPRESS; Database= database; Trusted_Connection=yes" conn = "Provider=SQLOLEDB;Data Source=.\SQLEXPRESS;Initial Catalog=database;UserID=sa;Password=123" conn = "Driver={SQL Server}; Server=.\SQLEXPRESS; Initial Catalog= database;Integrated Security=True;Network Library =dbmssocn" conn = "Provider=SQLNCLI10.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=database;Data Source=(local);" _______________________ RETURNED ERROR: Classic ASP return this error: [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied. _______________________ SQL Server: Authentication: SQL Server and windows authentication mode Im using IIS7 in a win 64bit Do I need a DB user and password in sql DB and querystring is the iis7 win7 64bit ______________________ Note: VB.NET can access with this conn String: "Data Source=.\SQLEXPRESS;Initial Catalog=nData;Integrated Security=True"
VIEWS ON THIS POST

131

Posted on:

Tuesday 20th November 2012
View Replies!

MS-SQL db connection problem

I work from home and now have to connect to the internet via a satallite ISP. I have tried to connect to various MS-SQL db's using my old settings (which worked fine) but I get a "general network error (pre login handshake())" From reading on other forums and this one it would seem that my ISP appear to have firewalled port 1433 which has stopped me connecting to the MS-SQL db's that controle websites that I maintain. Appart from changing my ISP or the location and hosting of the db's, Does anyone know of a solution or work round that will let me connect via enterprise manager to the db's I have tried pinging the MS-SQL server but it just times out so I'm guessing the problem is to do with port 1433 being blocked \t
VIEWS ON THIS POST

160

Posted on:

Tuesday 20th November 2012
View Replies!