|
|
 |
| Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |

September 27th, 2009, 06:42 AM
|
|
Registered User
|
|
Join Date: Sep 2009
Location: Lucknow, UP
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Connection String to connect sql database
When a file RECORD_HOME.asp is run from IIS 5.1 server (localhost) with folowing code to connect sql database
set con=Server.CreateObject("ADODB.Connection")
con.open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Record;Data Source=Home-PC\sqlinst"
the IE 6.0 displays the following error
-------------------------------------------------------
Technical Information (for support personnel)
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'HOME-PC\IUSR_HOME-PC'.
/sk/RECORD_HOME.ASP, line 40
-------------------------------------------------------
Sql Instance- sqlinst
Server- Home-PC
Database Name- Record
Server Authentication mode- Wnindow Authentication
The file is stored in sk folder which is resides in wwwroot folder. The same connection string works fine in VB6 project. What will be exact the connection string?
|

September 27th, 2009, 06:48 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi there,
By running with "Integrated Security=SSPI", the connection to the database is made in the context of the calling user. In a VB 6 application, that account is probably your own account which probably has access to the database. In an ASP application, the account used is the IUSR account. You can either grant the IUSR account access to the database, or use SQL authentication in your connection string.
For more details: http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395
Cheers,
Imar
|

September 27th, 2009, 10:27 PM
|
|
Registered User
|
|
Join Date: Sep 2009
Location: Lucknow, UP
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanks for reply. Here again i want to know that how can be granted IUSR acount in connection string
|

September 28th, 2009, 04:08 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Did you read the article I linked to?
Imar
|

September 29th, 2009, 02:13 AM
|
|
Registered User
|
|
Join Date: Sep 2009
Location: Lucknow, UP
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I read and found the solution. Thanks for guidence. one more thing i want to know that what will be appropriate data type to store text of length>20000 characters in sql database (memo type in Access database). In sql server database text and varchar data type allows only up to 8000 characters.
|

September 29th, 2009, 07:20 AM
|
 |
Wrox Author
Points: 33,554, Level: 80 |
|
|
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 10,228
Thanks: 7
Thanked 203 Times in 201 Posts
|
|
Hi there,
That limit only applies to varchar / nvarchar, not to text / ntext. These data types allow up to 1 or 2 Gig of data.
Cheers,
Imar
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |