SQL Server with ASP

SQL Server with ASP

Post by TWFuaXNoLm » Tue, 14 Sep 2004 21:37:03


Hi,
There are two ways to connect i.e with DSN and without DSN.
Following is the example of DSN based.

Dim MyConn ' Connection Name
Dim RS ' Recordset Variable
Dim SQL ' Variable for SQL statement

Set MyConn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Recordset")
MyConn.Open "DSN=DSNName;UID=UserID;PWD=Password;"

SQL="Select fieldname1, fieldname2 From tablename "

For information about what above code means see below
http://www.yqcomputer.com/

Another good link is -:
http://www.yqcomputer.com/
----------------------------------------------------------------------
For DSN less check following link
http://www.yqcomputer.com/
 
 
 

1. Problem connecting to SQL Server from ASP on separate server (ASP.NET works ok)

2. ASP2.0 SQL Server 2000 "ASP SQL GURU" NEEDED!

Hi

New to ASP2.0 programming, I need some help on the Connection String that I
want to place in the web.config file.

I am running Visual Studio 2005 Web Developer and the web hosting company
has is using SQL Server 2000.

I need to build a connection string...

<connectionStrings>
<add name= "uniquename" uniquename = "???????... />
<ConnectionStrings


These are the known attributes:

Provider ( hosting company has forwarded an 8 char string)
Data Source (hosting company has forwarded a name not an IP address)
Database name (my database name)
User ID ( have one assisgned)
Password ( have one assigned)
Trusted Connection = false
Encrypt = true

At the moment I have an error message that reads "Unregognised attribute
'connectionstring'. Note that attribute are case-sensitive, which i
believe is not the cuase of the problem.

If someone could help that would be much appreciated!


Thanks
Hamish

3. Trouble Deleteing records in DataBase - SQL Server 7 - ASP.NET?

4. How to upload a text file into SQL Server via ASP.NET?

5. SQL Server 2000/ASP.NET 2.0 Connection String: Works with Cassini, not with IIS 5.1

6. Accessing SQL server using ASP .NET

7. problem about checking of a particular database in SQL Server through ASP

8. Problem Uploading templated documents to SQL Server in ASP.net

9. failed to connect to SQL server from asp.net

10. import .csv file into SQL Server via asp.net page

11. Which will be better using sql server 2005 - ASP Net.Web Applicaiton or Windows Applications

12. Cannot delete using GridView & SQL Server in ASP.NET 2.0

13. Connecting to SQL Server from ASP.NET page using SqlClient namespa

14. Which version is enough for Sql Server and ASP.NET applications at the same time?

15. import Excel-sheet in SQL server through asp.net webpage