Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 3rd, 2008, 01:27 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default Connection string

Hi Does any one know how to change the conn string from attach mode to a normal one?
I am using the online diary application which the original code has the attach method on the code in web config and under app-code folder.
i did change the connection string in the web config that is ok now how is the connection string in the app-code folder within the class gonna be, it cant be the same cos i did try and it gives me an sql error :Generating user instances in SQL Server is disabled. Use sp_configure 'user instances enabled' to generate user instances.:
which i have enabled .
any suggestions ?

thanks

bx
__________________
bx
  #2 (permalink)  
Old August 3rd, 2008, 01:31 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi there,

Take a look here:

http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=395

and here:

http://www.connectionstrings.com/

Hope that helps,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
  #3 (permalink)  
Old August 3rd, 2008, 01:45 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

Hi Imar thanks for the replay the connection in the web confiis working the one inside the lasses does not.
This is the conn in the web config:<add name="DiaryDBConnectionString" connectionString="Data Source=SQLEXPRESS;Initial Catalog=DiaryDB.mdf;User ID=xxxxxx; Password=xxxxxxx"
   providerName="System.Data.SqlClient" />
how do i change the conn inside the class? can it be the same

Public Class DiaryEvent
    Const conString As String = "Data Source=SQLEXPRESS;Initial Catalog=DiaryDB.mdf;User ID=xxxxx; Password=xxxxxxxx"


bx
  #4 (permalink)  
Old August 3rd, 2008, 02:11 PM
bex bex is offline
Friend of Wrox
 
Join Date: Aug 2008
Location: london, , United Kingdom.
Posts: 154
Thanks: 7
Thanked 1 Time in 1 Post
Default

there is some thing else, i dont want to use the attach method so i restored the database in a sql server and delete the app-data folder from the directory, but every time i rebuild the application the app-data folder is created,there is a bit of code that does that and i cant find it,

bx
  #5 (permalink)  
Old August 3rd, 2008, 02:16 PM
Imar's Avatar
Wrox Author
Points: 72,055, Level: 100
Points: 72,055, Level: 100 Points: 72,055, Level: 100 Points: 72,055, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,086
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

The code doesn't do it; the ASP.NET run-time does this.

Take a look here to learn how to reconfigure ASP.NET (linked to from the first article I posted in this thread): http://weblogs.asp.net/scottgu/archi...25/423703.aspx

BTW, it should be .\SqlExpress if you're working with the expression version.

HtH,

Imar


---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of Beginning ASP.NET 3.5 : in C# and VB, ASP.NET 2.0 Instant Results and Dreamweaver MX 2004
Want to be my colleague? Then check out this post.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connection string MunishBhatia ASP.NET 2.0 Professional 4 May 16th, 2007 05:50 AM
Connection String jmss66 Oracle 4 August 8th, 2006 03:19 AM
Connection String slgknjn VB Databases Basics 2 February 26th, 2005 03:14 AM
Connection String fs22 Classic ASP Databases 3 August 30th, 2004 01:25 AM
Connection String Help. diamond2165 BOOK: ASP.NET Website Programming Problem-Design-Solution 1 November 7th, 2003 06:09 AM



All times are GMT -4. The time now is 10:28 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.