Sunday, March 11, 2012
"SQL: The Complete Reference" source?
CD is missing. I have access to SQL Server 2000 and so don't need the
trial software but would like to get the source for the database used
in the examples. Does anyone know where I can get this?What's the name of the sample database used in the examples?
--
Gail Erickson [MS]
SQL Server Documentation Team
This posting is provided "AS IS" with no warranties, and confers no rights
"SteveH" <steve.holle@.gmail.com> wrote in message
news:1139507451.169408.5450@.f14g2000cwb.googlegroups.com...
>I purchased a used copy of the SQL book listed in the subject but the
> CD is missing. I have access to SQL Server 2000 and so don't need the
> trial software but would like to get the source for the database used
> in the examples. Does anyone know where I can get this?
>|||SteveH wrote:
> I purchased a used copy of the SQL book listed in the subject but the
> CD is missing. I have access to SQL Server 2000 and so don't need the
> trial software but would like to get the source for the database used
> in the examples. Does anyone know where I can get this?
Have you checked the publisher's web site. Many publishers post the
source code from books. Also, you might try the author's home page (if
you have it), which may have some information as well.
--
David Gugick - SQL Server MVP
Quest Software
Tuesday, March 6, 2012
"Object reference not set to an instance of an object. " and connection string
Hi, I am deploying my web through a web hosting services which provides SQL database support. I got following errors whenever I try to open my webpage,which never happen when I run my web on the local machine.
I have my connection string configured in my web.config as below:
<addname="ArtHouseConnection"connectionString="Server=serveripaddress; Integrated Security=True; Database=arteh3_database;User Id=username;Password=password;"providerName="System.Data.SqlClient"/>
<addname="ASPNETDBConnectionString1"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True"providerName="System.Data.SqlClient"/>
This is the source code where error was generated:
public
staticclass ArtHouseConfiguration{
//cache connection stringprivatereadonlystaticstring dbConnectionString;//cache data provider nameprivatereadonlystaticstring dbProviderName;privatereadonlystaticstring siteName;//initialize constructor propertiesstatic ArtHouseConfiguration(){
dbConnectionString = ConfigurationManager.ConnectionStrings[
"ArtHouseConnection"].ConnectionString;dbProviderName = ConfigurationManager.ConnectionStrings[
"ArtHouseConnection"].ProviderName;siteName = ConfigurationManager.AppSettings["SiteName"];}
and finally this is the error mg I got:
Object reference not set to an instance of an object.
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.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 30: static ArtHouseConfiguration()Line 31: {Line 32: dbConnectionString = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ConnectionString;Line 33: dbProviderName = ConfigurationManager.ConnectionStrings["ArtHouseConnection"].ProviderName;Line 34:
Source File:d:\inetpub\vhosts\artehouse.org\httpdocs\App_Code\ArtHouseConfiguration.cs Line:32
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.] ArtHouseConfiguration..cctor() in d:\inetpub\vhosts\artehouse.org\httpdocs\App_Code\ArtHouseConfiguration.cs:32[TypeInitializationException: The type initializer for 'ArtHouseConfiguration' threw an exception.] ArtHouseConfiguration.get_EnableErrorLogEmail() in d:\inetpub\vhosts\artehouse.org\httpdocs\App_Code\ArtHouseConfiguration.cs:74 Utilities.LogError(Exception ex) in d:\inetpub\vhosts\artehouse.org\httpdocs\App_Code\Utilities.cs:100 ASP.global_asax.Application_Error(Object sender, EventArgs e) in d:\inetpub\vhosts\artehouse.org\httpdocs\Global.asax:20 System.EventHandler.Invoke(Object sender, EventArgs e) +0 System.Web.HttpApplication.RaiseOnError() +182
Anyone got any ideas? thank you!
Hi genjioo,
This seems to have something to do with the web.config file.
Please check if the connections strings have been put under the configuration\connectionStrings section. Here is a typical sample
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<connectionStrings>
<add name="ConnStr1" connectionString="LocalSqlServer: data source=127.0.0.1;Integrated Security=SSPI;Initial Catalog=aspnetdb"
providerName="System.Data.SqlClient" />
</connectionStrings>
</configuration>
If it is not put under this, the ConfigurationManager.ConnectionStrings will not be able to find it.
"Object reference not set to an instance of an object" When Retrieving Data/Schema in Desi
Hi There,
This is related to a ms access database but since I use the SqlDataSource control I thought I should post here.
I have a project that I was working on with this ms access db and using sql controls, everything was working just fine
since one day I started getting "Object reference not set to an instance of an object" messages when I try to design
a query or retrieve a schema, nothing works at design time anymore but at runtime everything is perfect, its a lot
of work for me now to create columns,schemas and everything manually, I've tried reinstalling visualstudio, ado components
but nothing seems to fix it, did this ever happen to any of you guys?
any tip is really appreciated
thanks a lot
Hi faguiar,
You wouldn't have to use DataSet Typed. You should have to use BusinessEntities.
Good Coding!
Javier Luna
http://guydotnetxmlwebservices.blogspot.com/
but it used to work fine before, I'm pretty sure this is a nasty ide bug that needs a hack but I can't find a solution myself.
thank you
