Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





When Was Db Object Last Updated?


Guys,

Is there a way to find out when a certain DB object (e.g. Stored procedure) was last modified?

SYSOBJECTS table contains crdate and refdate fields. None of these, however, appear to tell me when when the object was last updated.

Any suggestions?


Thanks a lot




View Complete Forum Thread with Replies

Related Forum Messages:
Linked Reports Not Being Updated When Master Report Is Updated
Since updating to SQL Server 2005 SP2 I've noticed two things about Linked Reports.
 
1.  I do a lot of 'Snapshot' reports.  With SP-1 if I updated a master report and made any changes to the Parameter List - it undid all my custom parameter changes on linked versions (restored to the Master Reports Defaults).  While this is no longer happening with SP2 - it is still 'unhiding' the parameters.
 
2.  With SP-1 if I added/deleted columns or made other changes to the report structure - the linked reports would pick up on the changes with their next refresh.  With SP-2 I'm finding that I have to 'Re-link' the linked report back to the master report before the changes are refreshed.  This is very time consuming especially with each report having 8 or more Snapshot reports pre-set up.
 
Am I missing something - or is this a 'bug'...
 
Any help would be appreciated...

View Replies !
Save Updated Date When Row Is Updated
Hi,I want to save the last modification date when the row is updated. I have a column called "LastModification" in the table, every time the row is update I want to set the value of this column to the current date. So far all I know is that I need to use a trigger and the GetDate() function, but could any body help me with how to set the value of the column to getdate()? thanks for your help. 

View Replies !
Server Error: Object Reference Not Set To An Instance Of An Object. Trying To Upload Image In Database
Does any one has any clue for this error ? I did went through a lot of articles on this error but none helped . I am working in Visual studie 2005 and trying to upload image in sql database through a simple form. Here is the code
 
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using System.Web.Configuration;
using System.IO;
public partial class Binary_frmUpload : System.Web.UI.Page
{protected void Page_Load(object sender, EventArgs e)
{
}protected void btnUpload_Click(object sender, EventArgs e)
{if (FileUpload.HasFile == false)
{
// No file uploaded!lblUploadDetails.Text = "Please first select a file to upload...";
}
else
{string str1 = FileUpload.PostedFile.FileName;
 string str2 = FileUpload.PostedFile.ContentType; string connectionString = WebConfigurationManager.ConnectionStrings["GSGA"].ConnectionString;
//Initialize SQL Server Connection SqlConnection con = new SqlConnection(connectionString);
//Set insert query string qry = "insert into Officers (Picture,PictureType ,PicttureTitle) values(@ImageData, @PictureType, @PictureTitle)";
//Initialize SqlCommand object for insert. SqlCommand cmd = new SqlCommand(qry, con);
//We are passing Original Image Path and Image byte data as sql parameters. cmd.Parameters.Add(new SqlParameter("@PictureTitle", str1));
cmd.Parameters.Add(new SqlParameter("@PictureType", str2));Stream imgStream = FileUpload.PostedFile.InputStream;
int imgLen = FileUpload.PostedFile.ContentLength;byte[] ImageBytes = new byte[imgLen]; cmd.Parameters.Add(new SqlParameter("@ImageData", ImageBytes));
//Open connection and execute insert query.
con.Open();
cmd.ExecuteNonQuery();
con.Close(); //Close form and return to list or images.
 
}
}
}
 
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 32:
Line 33: string str2 = FileUpload.PostedFile.ContentType;
Line 34: string connectionString = WebConfigurationManager.ConnectionStrings["GSGA"].ConnectionString;
Line 35:
Line 36: //Initialize SQL Server Connection Source File: c:UsersManojDocumentsVisual Studio 2005WebSitesGSGABinaryfrmUpload.aspx.cs    Line: 34  
Stack Trace:




[NullReferenceException: Object reference not set to an instance of an object.]
Binary_frmUpload.btnUpload_Click(Object sender, EventArgs e) in c:UsersManojDocumentsVisual Studio 2005WebSitesGSGABinaryfrmUpload.aspx.cs:34
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

View Replies !
' The Definition Of Object [object Name] Has Changed Since It Was Compiled' Error When Altering A Trigger In 2005
Hello All
 
Not sure if this is the right forum to post this question to, so if it's not, please accept my apologies.
 
I'm working in SQL Server 2005 with a database that was migrated to 2005 from SQL Server 2000.  I have to alter a trigger on a table for some functionality changes, and when I modify the trigger and then access it through the application the database is working with, I receive this error:
 

There was a error in the [stored procedure name] procedure. Error Number: -2147217900 Error Description: [Microsoft][ODBC SQL Server Driver][SQL Server]The definition of object '[trigger name]' has changed since it was compiled.
 

[stored procedure name] and [trigger name] are where the actual names appear in the message.
 
I've tried running sp_recompile on the trigger, stored procedure, and table that are associated with this, and nothing works.  I have dropped the trigger, which allows the save process to complete (but doesn't perform the required functionality, of course), and then re-created the trigger, but the error message still comes up.  The compatibility level for the database is SQL Server 2000 (80) (as it was migrated from SQL Server 2000 as I mentioned above).
 
Has anyone seen this, and if so, how can I fix it?
 
Thanks in advance for your help!
 
Jay

View Replies !
When Using A Sqldataadapter In VS 2005 I Get The Following Error At Runtime. Object Reference Not Set To An Instance Of An Object
Help! I have posted this before and I had hoped that the VS2005 SP1 would help my problem. It didn't. My code is shown below. I have dropped a sqlconnection, sqldataadapter and a strongly-typed dataset from the toolbox onto the component designer for my page and written my code. It compiles without any errors but at runtine I receive the system error "Object reference not set to an instance of an object." The error occurs at the first line where the sqldataadapter is mentioned. I have shufflled the code and the error still occurs at first mention of the dataadapter. I have set parameters to a simple string such as "myemail." It hasn't helped. I have used the "Dim" statement as "Dim DaAuthorLogin as System.Data.SqlClient.SqlDataadapter and Dim DaAuthorLogin as New ......) at the start of the private sub generated by the event requiring the data. Nothing helps. Here is my simple code to select data from a sqlserver 2000 database. Why do I continue to get this error?
Partial Class AuthorLogin
Inherits System.Web.UI.Page
Protected WithEvents AuthorInformation As System.Web.UI.Page
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.SqlSelectCommand1 = New System.Data.SqlClient.SqlCommand
Me.DaAuthorLogin = New System.Data.SqlClient.SqlDataAdapter
Me.MDData = New System.Data.SqlClient.SqlConnection
Me.DsAuthorLogin = New MedicalDecisions.DsAuthorLogin
CType(Me.DsAuthorLogin, System.ComponentModel.ISupportInitialize).BeginInit()
'
'SqlSelectCommand1
'
Me.SqlSelectCommand1.CommandText = "SELECT AuthorAlias, AuthorEmail, AuthorPassword, LastName, PreferredName" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "FRO" & _
"M T_Author" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "WHERE (AuthorEmail = @AuthorEmail) AND (AuthorPassword =" & _
" @AuthorPassword)"
Me.SqlSelectCommand1.Connection = Me.MDData
Me.SqlSelectCommand1.Parameters.AddRange(New System.Data.SqlClient.SqlParameter() {New System.Data.SqlClient.SqlParameter("@AuthorEmail", System.Data.SqlDbType.NVarChar, 50, "AuthorEmail"), New System.Data.SqlClient.SqlParameter("@AuthorPassword", System.Data.SqlDbType.NVarChar, 50, "AuthorPassword")})
'
'DaAuthorLogin
'
Me.DaAuthorLogin.SelectCommand = Me.SqlSelectCommand1
Me.DaAuthorLogin.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "T_Author", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("AuthorAlias", "AuthorAlias"), New System.Data.Common.DataColumnMapping("AuthorEmail", "AuthorEmail"), New System.Data.Common.DataColumnMapping("AuthorPassword", "AuthorPassword"), New System.Data.Common.DataColumnMapping("LastName", "LastName"), New System.Data.Common.DataColumnMapping("PreferredName", "PreferredName")})})
'
'MDData
'
Me.MDData.ConnectionString = "Data Source=CIS1022DAVID;Initial Catalog=CGData;Integrated Security=True;Pooling" & _
"=False"
Me.MDData.FireInfoMessageEventOnUserErrors = False
'
'DsAuthorLogin
'
Me.DsAuthorLogin.DataSetName = "DsAuthorLogin"
Me.DsAuthorLogin.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema
CType(Me.DsAuthorLogin, System.ComponentModel.ISupportInitialize).EndInit()
End Sub
Friend WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Friend WithEvents MDData As System.Data.SqlClient.SqlConnection
Friend WithEvents DaAuthorLogin As System.Data.SqlClient.SqlDataAdapter
Friend WithEvents DsAuthorLogin As MedicalDecisions.DsAuthorLogin
'NOTE: The following placeholder declaration is required by the Web Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs)
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
'no code here
End Sub
Private Sub AuthorLoginRegister_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginRegister.Click
'for new author registration
Response.Redirect("AuthorInformation.aspx")
End Sub
Private Sub AuthorLoginBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginBack.Click
'to navigate back
Response.Redirect("MainPaths.aspx")
End Sub
Protected Sub AuthorLoginPassword_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AuthorLoginPassword.TextChanged
'pass the parameters to the dataadapter and return dataset
DaAuthorLogin.SelectCommand.Parameters("@AuthorEmail").Value = AuthorLoginEmail.Text
DaAuthorLogin.SelectCommand.Parameters("@AuthorPassword").Value = AuthorLoginPassword.Text
MDData.Open()
DaAuthorLogin.Fill(DsAuthorLogin, "T_Author")
MDData.Close()
'set session objects
If DsAuthorLogin.T_Author.Rows.Count > 0 Then
Session("AuthorAlias") = DsAuthorLogin.T_Author(0).AuthorAlias
Session("LastName") = DsAuthorLogin.T_Author(0).LastName
Session("PreferredName") = DsAuthorLogin.T_Author(0).PreferredName
Response.Redirect("AuthorPaths.aspx")
Else : AuthorLoginNotValid.Visible = True
AuthorLoginEmail.Text = ""
AuthorLoginPassword.Text = ""
End If
End Sub
End Class
 
Thanks in advance,
David

View Replies !
Error: The Script Threw An Exception: Object Reference Not Set To An Instance Of An Object.
 

Anyone know what this error means and how to get rid of it? 

 

Public Sub Main()

Dim myMessage As Net.Mail.MailMessage

Dim mySmtpClient As Net.Mail.SmtpClient

myMessage.To(20) = New Net.Mail.MailAddress(me@hotmail.com)

myMessage.From = New Net.Mail.MailAddress(someone@microsoft.com)

myMessage.Subject = "as;dlfjsdf"

myMessage.Priority = Net.Mail.MailPriority.High

mySmtpClient = New Net.Mail.SmtpClient("microsoft.com")

mySmtpClient.Send(myMessage)

Dts.TaskResult = Dts.Results.Success

End Sub

 

Thanks,

View Replies !
Delete SQL Script As400 Throwing Object Reference Not Set To An Instance Of An Object
I am trying to send some data back to our as/400 from SQL server. Before I do so I need to delete entries from the table. I have an odbc connection set up and have used it sucessfully in a datareader compoenent but but when I try to use it for a delete SQL task it give me the followign error.  what am I doing wrong?  I even tried hardcoding in the system name/library name.
 
Here is my delete sql script
DELETE FROM DSSCNTL Where Companycode = 10
 
 
TITLE: SQL Task
------------------------------
Object reference not set to an instance of an object.
------------------------------
BUTTONS:
OK
------------------------------

 

View Replies !
Predict Query Gives 'DMPluginWrapper; Object Reference Not Set To An Instance Of An Object' Error
 

Hi,

I am trying to develop a custom algorithm. I have implemented and tested training methods, however I fail at prediction phase. When I try to run a prediction query against a model created with my algorithm I get:
 

Executing the query ...
Obtained object of type: Microsoft.AnalysisServices.AdomdClient.AdomdDataReader
COM error: COM error: DMPluginWrapper; Object reference not set to an instance of an object..
Execution complete

 
I know this is not very descriptive, but I have seen that algorith doesn't even executes my Predict(..) function (I can test this by logging to a text file)
So the problem is this, when I run prediction query DMPluginWrapper gives exception -I think- even before calling my custom method.

As I said it is not a very descriptive message but I hope I have hit a general issue.

Thanks...

View Replies !
Object Reference Not Set To An Instance Of An Object. MSSQL Server Report Builder
When I try and run Report Builder Reports i get this error message "Object reference not set to an instance of an object. "

I can run reports locally but not from Report manager

here is the stack trace info

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:





An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:





[NullReferenceException: Object reference not set to an instance of an object.]
Microsoft.Reporting.WebForms.WebRequestHelper.GetExceptionForMoreInformationNode(XmlNode moreInfo, XmlNamespaceManager namespaces) +18
Microsoft.Reporting.WebForms.WebRequestHelper.ExceptionFromWebResponse(Exception e) +358
Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension) +482
Microsoft.Reporting.WebForms.ServerReport.InternalRender(Boolean isAbortable, String format, String deviceInfo, NameValueCollection urlAccessParameters, Stream reportStream, String& mimeType, String& fileNameExtension) +958
Microsoft.Reporting.WebForms.ServerReportControlSource.RenderReport(String format, String deviceInfo, NameValueCollection additionalParams, String& mimeType, String& fileExtension) +84
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response) +143
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context) +75
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64





Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210

View Replies !
Microsoft Visual Studio Is Unable To Load This Document: Object Reference Is Not Set To An Instance Of An Object
Hi Everyone,
Please help me on this issue. I'm a new SSIS User.
I've installed Sql Server 2005 Developer Edition
When I create a new SSIS Project in Business Intelligence Development Studio,
I get the following message:
"Microsoft Visual Studio is unable to load this document: Object reference is not set to an instance of an object".
Error loading 'package.dtsx'bject reference is not set to an instance of an object
When I try to debug the package, I get the below message:
parameter Component(System.Design) is null.
I've uninstalled and installed SS 2005 several times, yet the problem persists.
Please help.
This is the package.dtsx

<?xml version="1.0"?><DTS:Executable xmlnsTS="www.microsoft.com/SqlServer/Dts" DTS:ExecutableType="MSDTS.Package.1"><DTSroperty DTS:Name="PackageFormatVersion">2</DTSroperty><DTSroperty DTS:Name="VersionComments"></DTSroperty><DTSroperty DTS:Name="CreatorName">USkothand1</DTSroperty><DTSroperty DTS:Name="CreatorComputerName">US6051KOTHAND1</DTSroperty><DTSroperty DTS:Name="CreationDate" DTSataType="7">4/8/2008 10:53:39 AM</DTSroperty><DTSroperty DTS:Name="PackageType">5</DTSroperty><DTSroperty DTS:Name="ProtectionLevel">1</DTSroperty><DTSroperty DTS:Name="MaxConcurrentExecutables">-1</DTSroperty><DTSroperty DTS:Name="PackagePriorityClass">0</DTSroperty><DTSroperty DTS:Name="VersionMajor">1</DTSroperty><DTSroperty DTS:Name="VersionMinor">0</DTSroperty><DTSroperty DTS:Name="VersionBuild">0</DTSroperty><DTSroperty DTS:Name="VersionGUID">{FBD98635-EDDE-4F58-9D53-356E8CB653FB}</DTSroperty><DTSroperty DTS:Name="EnableConfig">0</DTSroperty><DTSroperty DTS:Name="CheckpointFileName"></DTSroperty><DTSroperty DTS:Name="SaveCheckpoints">0</DTSroperty><DTSroperty DTS:Name="CheckpointUsage">0</DTSroperty><DTSroperty DTS:Name="SuppressConfigurationWarnings">0</DTSroperty><DTSroperty DTS:Name="ForceExecValue">0</DTSroperty><DTSroperty DTS:Name="ExecValue" DTSataType="3">0</DTSroperty><DTSroperty DTS:Name="ForceExecutionResult">-1</DTSroperty><DTSroperty DTS:Name="Disabled">0</DTSroperty><DTSroperty DTS:Name="FailPackageOnFailure">0</DTSroperty><DTSroperty DTS:Name="FailParentOnFailure">0</DTSroperty><DTSroperty DTS:Name="MaxErrorCount">1</DTSroperty><DTSroperty DTS:Name="ISOLevel">1048576</DTSroperty><DTSroperty DTS:Name="LocaleID">1033</DTSroperty><DTSroperty DTS:Name="TransactionOption">1</DTSroperty><DTSroperty DTS:Name="DelayValidation">0</DTSroperty>

<DTS:LoggingOptions><DTSroperty DTS:Name="LoggingMode">0</DTSroperty><DTSroperty DTS:Name="FilterKind">1</DTSroperty><DTSroperty DTS:Name="EventFilter" DTSataType="8"></DTSroperty></DTS:LoggingOptions><DTSroperty DTS:Name="ObjectName">Package</DTSroperty><DTSroperty DTS:Name="DTSID">{191D188C-EA6E-46D6-A46A-8C9F3C21C321}</DTSroperty><DTSroperty DTS:Name="Description"></DTSroperty><DTSroperty DTS:Name="CreationName">MSDTS.Package.1</DTSroperty><DTSroperty DTS:Name="DisableEventHandlers">0</DTSroperty></DTS:Executable>
Thanks
Best Regards

View Replies !
Problem In Converting MS Access OLE Object[Image] Column To BLOB (binary Large Object Bitmap)
Hi All,
i have a table in MS Access with CandidateId and Image column. Image column is in OLE object  format. i need to move this to SQL server 2005 with CandidateId column with integer and candidate Image column to Image datatype.
its very udgent, i need any tool to move this to SQL server 2005 or i need a code to move this table from MS Access to SQL server 2005 in C#.
please do the needfull ASAP. waiting for your reply
with regards
 
 
 

View Replies !
VS 2005 Error 'Object Reference Not Set To An Instance Of An Object' With Integration Services Project Create Failure
 

Just installed VS 2005 & SQLServer 2005 clients on my workstation.  When trying to create a new Integration Services Project and start work in the designer receive the MICROSOFT VISUAL STUDIO 'Object reference not set to an instance of an object.' dialog box with message "Creating project 'Integration Services project1'...project creation failed."
 
Previously I had SQLServer 2000 client with the little VS tool that came with it installed.  Uninstalled these prior to installing the 2005 tools (VS and SQLServer).
 
I'm not finding any information on corrective action for this error.
 
Any one have this problem and found the solution?
 
Thanks,
CLC
 
 

View Replies !
Update Problem, Error: Object Reference Not Set To An Instance Of An Object
Hi,
 
Hi created a Data adapter to get some info out of my SQLExpress database.
First I linked the data adapter to a gridview, and tested if I could gather, update,delete and insert info into tthe database through this gridview. No problems.
But because I want tot work with the data before I update my db tables, I've created a Business Layer between the adapter and gridview.
The busines layer consists of a object representing a country and methods to get, update, delete and isert data out and in of the DB. I use an objectdatasource in my presentation page to link the methonds with the insert, eduit and delete buttons of the gridview.
 Inserting and deleting entries is no porblem at all, editing the info however generates the following error:
"Object reference not set to an instance of an object"
Normally this means that you hace declared an variable, but you have still to create an instance, usung the New() method or provide an value for this object. Problem is, if a try to add the new() method then i get the error
"Error 1 Argument not specified for parameter 'rb' of 'Friend Sub New(rb As System.Data.DataRowBuilder)'
Can someone help me, I'm out of ideas! It's just the update method that is not working, the rest works fine.
Imports Microsoft.VisualBasic
Imports CountriesTableAdapters
Imports System.DataImports System.Data.SqlClient
 Public Class Country
Private _Country_ID As Integer
Private _ISO, _NL, _FR, _ENG, _Continent, _Remarks As String
Private _Enabled As Boolean
Public Property Country_ID() As Integer
GetReturn _Country_ID
End GetSet(ByVal Value As Integer)
_Country_ID = CInt(Value)
End Set
End Property
Public Property ISO() As String
GetReturn _ISO
End GetSet(ByVal Value As String)
_ISO = Trim(Value.ToString)
End Set
End Property
Public Property NL() As String
GetReturn _NL
End GetSet(ByVal Value As String)
_NL = Trim(Value.ToString)
End Set
End Property
Public Property FR() As String
GetReturn _FR
End GetSet(ByVal Value As String)
_FR = Trim(Value.ToString)
End Set
End Property
Public Property ENG() As String
GetReturn _ENG
End GetSet(ByVal Value As String)
_ENG = Trim(Value.ToString)
End Set
End Property
Public Property Continent() As String
GetReturn _Continent
End GetSet(ByVal Value As String)
_Continent = Trim(Value.ToString)
End Set
End Property
Public Property Remarks() As String
GetReturn _Remarks
End GetSet(ByVal Value As String)
_Remarks = Trim(Value.ToString)
End Set
End Property
Public Property Enabled() As Boolean
GetReturn _Enabled
End GetSet(ByVal Value As Boolean)
_Enabled = CBool(Value)
End SetEnd PropertyEnd Class
 
Public Class Countries
Private _CountriesAdapter As CountriesTableAdapter = NothingProtected ReadOnly Property Adapter() As CountriesTableAdapter
Get
If _CountriesAdapter Is Nothing Then_CountriesAdapter = New CountriesTableAdapter
End IfReturn _CountriesAdapter
End Get
End PropertyPublic Function GetCountries() As CountriesDataTable
Return Adapter.GetCountries
End FunctionPublic Sub AddCountry(ByVal ObjCountry As Country)
Dim CountriesTbl As New CountriesDataTableDim CountryRw As CountriesRow = CountriesTbl.NewCountriesRow
With ObjCountry
If String.IsNullOrEmpty(.ISO) ThenThrow New ArgumentException("ISO afkorting is verpicht", "ISO")
Else
CountryRw.ISO = .ISO
End If
If String.IsNullOrEmpty(.NL) ThenThrow New ArgumentException("Landsnaam is verpicht", "NL")
Else
CountryRw.NL = .NL
End If
If String.IsNullOrEmpty(.FR) ThenThrow New ArgumentException("Landsnaam is verpicht", "FR")
Else
CountryRw.FR = .FR
End If
If String.IsNullOrEmpty(.ENG) ThenThrow New ArgumentException("Landsnaam is verpicht", "ENG")
Else
CountryRw.ENG = .ENG
End If
If String.IsNullOrEmpty(.Continent) ThenThrow New ArgumentException("Continent is verpicht", "Continent")
Else
CountryRw.Continent = .Continent
End If
If String.IsNullOrEmpty(.Remarks) Then
CountryRw.SetRemarksNull()
Else
CountryRw.Remarks = .Remarks
End If
CountryRw.Enabled = .Enabled
End With
'Voeg nieuwe rij toe aan bestaande countriestable
CountriesTbl.AddCountriesRow(CountryRw)
'Voeg nieuw land toe aan de Database
Adapter.Update(CountriesTbl)
End SubPublic Sub UpdateCountry(ByVal ObjCountry As Country)
Dim CountriesTbl As New CountriesDataTableDim CountryRw As CountriesRow
CountryRw = CountriesTbl.FindByCountry_ID(ObjCountry.Country_ID)
If String.IsNullOrEmpty(ObjCountry.ISO) ThenThrow New ArgumentException("ISO afkorting is verpicht", "ISO")
Else
CountryRw.ISO = ObjCountry.ISO
End If
If String.IsNullOrEmpty(ObjCountry.NL) ThenThrow New ArgumentException("Landsnaam is verpicht", "NL")
Else
CountryRw.NL = ObjCountry.NL
End If
If String.IsNullOrEmpty(ObjCountry.FR) ThenThrow New ArgumentException("Landsnaam is verpicht", "FR")
Else
CountryRw.FR = ObjCountry.FR
End If
If String.IsNullOrEmpty(ObjCountry.ENG) ThenThrow New ArgumentException("Landsnaam is verpicht", "ENG")
Else
CountryRw.ENG = ObjCountry.ENG
End If
If String.IsNullOrEmpty(ObjCountry.Continent) ThenThrow New ArgumentException("Continent is verpicht", "Continent")
Else
CountryRw.Continent = ObjCountry.Continent
End If
If String.IsNullOrEmpty(ObjCountry.Remarks) Then
CountryRw.SetRemarksNull()
Else
CountryRw.Remarks = ObjCountry.Remarks
End If
CountryRw.Enabled = ObjCountry.Enabled
Adapter.Update(CountriesTbl)
End SubSub DeleteCountry(ByVal ObjCountry As Country)
Adapter.Delete(ObjCountry.Country_ID)End Sub
End Class
 
 
 
 
 

View Replies !
Object Reference Not Set To An Instance Of An Object (Inserting Data Into Database)
Each time I press submit to insert data into the database I receive the following message. I use the same code on another page and it works fine. Here is the error:


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 125: MyCommand.Parameters("@Balance").Value = txtBalance.Text
Line 126:
Line 127: MyCommand.Connection.Open()
Line 128:
Line 129: Try


Source File: c:inetpubwwwrootCreditRepairCreditor_Default.aspx.vb Line: 127

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
CreditRepair.CreditRepair.Vb.Creditor_Default.btnSaveAdd_Click(Object sender, EventArgs e) in c:inetpubwwwrootCreditRepairCreditor_Default.aspx.vb:127
System.Web.UI.WebControls.Button.OnClick(EventArgs e)
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
System.Web.UI.Page.ProcessRequestMain()



Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSave.Click

If (Page.IsValid) Then

Dim DS As DataSet
Dim MyCommand As SqlCommand

Dim AddAccount As String = "insert into AccountDetails (Account_ID, Report_ID, Balance) values (@Account_ID, @Report_ID, @Balance)"

MyCommand = New SqlCommand(AddAccount, MyConnection)

MyCommand.Parameters.Add(New SqlParameter("@Account_ID", SqlDbType.Char, 50))
MyCommand.Parameters("@Account_ID").Value = txtAccount_ID.Text

MyCommand.Parameters.Add(New SqlParameter("@Report_ID", SqlDbType.Char, 50))
MyCommand.Parameters("@Report_ID").Value = txtReport_ID.Text

MyCommand.Parameters.Add(New SqlParameter("@Balance", SqlDbType.Char, 50))
MyCommand.Parameters("@Balance").Value = txtBalance.Text

MyCommand.Connection.Open()

MyCommand.ExecuteNonQuery()

Response.Redirect("Customer_Details.aspx?SS='CustHeadGrid.Columns[0].Item.lblSS.Text)")

MyCommand.Connection.Close()
End If

View Replies !
Script Task Error --Object Reference Not Set To An Instance Of An Object
I am trying to execute this code feom Script task while excuting its giving me error that "Object reference not set to an instance of an object." The assemblies  Iam referening in this code are there in GAC. Any idea abt this.

 

Thanks,

Public Sub Main()

Dim remoteUri As String

Dim fireAgain As Boolean

Dim uriVarName As String

Dim fileVarName As String

Dim httpConnection As Microsoft.SqlServer.Dts.Runtime.HttpClientConnection

Dim emptyBytes(0) As Byte

Dim SessionID As String

Dim CusAuth As CustomAuth

Try

' Determine the correct variables to read for URI and filename

uriVarName = "vsReportUri"

fileVarName = "vsReportDownloadFilename"

' create SessionID for use with HD Custom authentication

CusAuth = New CustomAuth(ASCIIEncoding.ASCII.GetBytes(Dts.Variables("in_vsBatchKey").Value.ToString()))

 

Dts.Variables(uriVarName).Value = Dts.Variables(uriVarName).Value.ToString() + "&" + _

"BeginDate=" + Dts.Variables("in_vsBeginDate").Value.ToString() + "&" + _

"EndDate=" + Dts.Variables("in_vsEndDate").Value.ToString()

Dim request As HttpWebRequest = CType(WebRequest.Create(Dts.Variables(uriVarName).Value.ToString()), HttpWebRequest)

'Set credentials based on the credentials found in the variables

request.Credentials = New NetworkCredential(Dts.Variables("in_vsReportUsername").Value.ToString(), _

Dts.Variables("in_vsReportPassword").Value.ToString(), _

Dts.Variables("in_vsReportDomain").Value.ToString())

'Place the custom authentication session ID in a cookie called BatchSession

request.CookieContainer.Add(New Cookie("BatchSession", CusAuth.GenerateSession("EmailAlertingSSIS"), "/", Dts.Variables("in_vsReportDomain").Value.ToString()))

' Set some reasonable limits on resources used by this request

request.MaximumAutomaticRedirections = 4

request.MaximumResponseHeadersLength = 4

' Prepare to download, write messages indicating download start

Dts.Events.FireInformation(0, String.Empty, String.Format("Downloading '{0}' from '{1}'", _

Dts.Variables(fileVarName).Value.ToString(), Dts.Variables(uriVarName).Value.ToString()), String.Empty, 0, fireAgain)

Dts.Log(String.Format("Downloading '{0}' from '{1}'", Dts.Variables(fileVarName).Value.ToString(), Dts.Variables(uriVarName).Value.ToString()), 0, emptyBytes)

' Download data

Dim response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)

' Get the stream associated with the response.

Dim receiveStream As Stream = response.GetResponseStream()

' Pipes the stream to a higher level stream reader with the required encoding format.

Dim readStream As New StreamReader(receiveStream, Encoding.UTF8)

Dim fileStream As New StreamWriter(Dts.Variables(fileVarName).Value.ToString())

fileStream.Write(readStream.ReadToEnd())

fileStream.Flush()

fileStream.Close()

readStream.Close()

fileStream.Dispose()

readStream.Dispose()

 

'Download the file and report success

Dts.TaskResult = Dts.Results.Success

Catch ex As Exception

' post the error message we got back.

Dts.Events.FireError(0, String.Empty, ex.Message, String.Empty, 0)

Dts.TaskResult = Dts.Results.Failure

End Try

End Sub

 

View Replies !
Script Component Throws Object Reference Not Set To An Instance Of An Object
Hello,

I've ran into trouble while creating a rather simple transformation script component (one input, one output). The only thing it has to do is test the values coming from it's input rows and set the values of the output rows according to some rules; something like:





Code Block

Public Overrides Sub InputBrowser_ProcessInputRow(ByVal Row As InputBrowserBuffer)


If Row.UserAgent.Contains("MSIE") Then 'test input
            Row.BrowserName = "Internet Explorer" 'set output
End If



End Sub

This raises an "Object reference not set to an instance of an object." exception. Commenting out the input (Row.UserAgent) solves the exception, but I actually do need to test the contents of the input row (and by leaving only the output manipulation, the script won't reach it's end, the components remain yellow). What can I do about this?


Thanks in advance!

View Replies !
Report Server Issue Object Reference Not Set To An Instance Of An Object
Hi all,

I'm getting this problem 'Object reference not set to an instance of an object.' whenever I try to review a report and I checked the log file and this is what it had

 

w3wp!ui!1!11/14/2006-10:54:20:: Unhandled exception: System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.Reporting.WebForms.WebRequestHelper.GetExceptionForMoreInformationNode(XmlNode moreInfo, XmlNamespaceManager namespaces)
   at Microsoft.Reporting.WebForms.WebRequestHelper.ExceptionFromWebResponse(Exception e)
   at Microsoft.Reporting.WebForms.ServerReport.ServerUrlRequest(Boolean isAbortable, String url, Stream outputStream, String& mimeType, String& fileNameExtension)
   at Microsoft.Reporting.WebForms.ServerReport.GetStyleSheet(String styleSheetName)
   at Microsoft.Reporting.WebForms.ReportServerStyleSheetOperation.PerformOperation(NameValueCollection urlQuery, HttpResponse response)
   at Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

Some previous forums stated checking the webconfig file but the web config file look okay. Is there another way to fix this.

 

Much Thanks,

 

Carl

 

 

 

View Replies !
Object Reference Not Set To An Instance Of An Object As System.NullReferenceException
Hi,

I am using a stored procedure and places the value into a dataset.
But it prompts me an error.

And here is my code:

Dim cmd As New SqlCommand("testProc", mySqlConnection)

cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@PrdCode", SqlDbType.VarChar, 50).Value = strBonPrdCode
cmd.Parameters.Add("@keyWord", SqlDbType.VarChar, 250).Value = srchKeyword
cmd.Parameters.Add("@keyWord_Count", SqlDbType.Int).Value = Keyword_count

Dim da As New SqlDataAdapter(cmd)
Dim ds As New DataSet

da.Fill(ds, "Results")

recCount = ds.Tables("Results").Rows.Count


Can you give me a solution to solve this problem. Thanking you in advance.

View Replies !
Query Builder - Object Reference Not Set To An Instance Of An Object
When I access query builder when configure SqlDataSource I receive
"Object reference not set to an instance of an object". I tried to reinstall
FW 2.0 but without success.
I also tried contact my local support vendor  and google of course but
no results was found.
Thank you
 
Martin

View Replies !
SSIS Design : Object Reference Not Set To An Instance Of An Object
In visual studio 2005, I create a new Integration Services Project. It tries to create the first package by default "Package.dtsx". The "Package.dtsx[Design]" tab displays

Microsoft Visual Studio is unable to load this document

Object reference not set to an instance of an object

I try to create new SSIS package or edit an existing one (from tutorial), I get the same error in the SSIS graphical user interface tab.

Thanks for your help.

 

View Replies !
Script Task Component: Object Not Set To Instance Of Object
 i have some code in a script task component which is meant to find a cell in an excel sheet and assign a variable to its value in the script component. I receive an error that the object is not set in instance of object. below is the code which i tried to simplify to find the error, but it is still occurring.  any help would be appreciated. thank you
 
 

Dim vars As IDTSVariables90

vars.Unlock()

Me.VariableDispenser.LockForWrite(Variables.freq)

Variables.freq = "1"

View Replies !
System.NullReferenceException: Object Reference Not Set To An Instance Of An Object - Help
I have a script task that worked FINE yesterday. Now when I run it, I get the following error:
 
[myTask [64]] Error: System.NullReferenceException: Object reference not set to an instance of an object.    at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)    at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)    at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)
 
Help!
 
 

View Replies !
EXECUTE SQL TASK --&&> Object Reference Not Set To An Instance Of An Object
 

 

 
Hi all,
 
Does anyone see the error below before?
I am using SSIS Execute SQL Task (ADO.NET) to update a table using a stored procedure.
It works like this many times for me and all of a sudden, not sure what is changing in the environment, I kept getting this WARNING when I click on PARSE QUERY
€œObject Reference Not Set to An Instance of an Object€? when I click on PARSE QUERY.
 
This is going against SQL SERVER 2005 SP2 x64 Enterprise.
 
Note that this task executes fine and the stored procedure updates data.
 
The stored procedure does the following.
There are other stored procedures of different kinds and they all worked.
But all of them give this error when I click on PARSE QUERY.
 



Code Snippet
DECLARE @TodayDate datetime
SET @TodayDate = GETDATE()
 
Exec dbo.updDimBatch
 @BatchKey = @BatchKey,
 @ParentBatchKey = @ParentBatchKey,
 @BatchName = 'Load Customer Increment',
 @BatchStartDate = NULL,
 @BatchEndDate = @TodayDate,
 @StatusKey = NULL,
 @RowsInserted = @Count_Insert,
 @RowsUpdated = @Count_Update,
 @RowsException = NULL,
 @RowsError = NULL,
 @UpdatedDate = @TodayDate,
 @BatchDescription = NULL
 
OLEDB Sample also give me syntax error
 
exec dbo.updDimBatch ?,?,'Load Activity Increment','6/27/2007','6/27/2007',1,?,?,0,0,'6/27/2007',''




 

I tried to change to OLEDB and call the stored procedure like this but got syntax error?

Not sure what is the error here.

 

 

 

 

 

View Replies !
Forms Authentication - Object Reference Not Set To An Instance Of An Object
I have successfully implemented forms authentication, that means, I can access it from a web browser, get the login page, add my credentials and log on to Reporting Services.

 

But now I try to access reporting services Web service from a winforms app, doing something like this:

ReportingService _rs = new ReportingService();

_rs.LogonUser("myUsername", "myPassword", "");

_rs.Url = "http://myServer/ReportServer/ReportService.asmx";

CatalogItem[] items = _rs.ListChildren("/", true);

 

The first three lines works fine, but he last line (ListChildren) throws a "Object reference not set to an instance of an object" exception. I have enabled remote error and looked in the RS log files, but nowhere I can find where this null-pointer exception occured.

 

Any idea about where to go from here?

 

Regards Andreas

View Replies !
SqlDependency......object Reference Not Set To An Instance Of An Object
hello,
I using following code for SqlDependency for my website.
 
global.asax.csSystem.Data.SqlClient.SqlDependency.Start(ConfigurationSettings.AppSettings["ConnectionInfo"]);
 
pagename.aspx 
<%@ OutputCache Duration="360000" Location="Server" VaryByParam="*" SqlDependency="CommandNotification" %>
 the website is running on the machine with windows server 2003 installed, database sql server 2005 on other machine.
It work fine from my computer, but if I open the same page on other computer and I got following error: "object reference not set to an instance of an object"
It depends on which computer(user) open the page first, and the second one open the same page will not work.
any idea?
 

View Replies !
Object Reference Not Set To An Instance Of An Object - NOT OBVIOUS....
....not to me, anyway. And I have searched. I'm getting this in several places, and I'm sure there's something underlying the I just haven't cottoned on to yet. Please have a look at the following. The error appears in the "SqlTextSource.SelectCommand=" line. Debug shows SqlTextSource is null, but why? It's in the .aspx! Thanks very much.
<%@ Page Language="C#" AutoEventWireup="true"    CodeFile="AddText.aspx.cs" Inherits="AddText"   MasterPageFile="Admin.master" %>
<asp:Content ID="Content1"    ContentPlaceHolderID="ContentPlaceHolder1"   Runat="Server">
   <div>      <asp:SqlDataSource ID="SqlTextSource" runat="server"          ConnectionString= etc etc         SelectCommand= DeleteCommand= InsertCommand= etc etc         <DeleteParameters> <InsertParameters> etc etc      </asp:SqlDataSource>   </div></asp:Content>
using System;using System.Data;using System.Configuration;using System.Collections;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Web.UI.HtmlControls;
public partial class AddText : System.Web.UI.Page{   protected void Page_Load(object sender, EventArgs e)   {      SqlTextSource.SelectCommand = "SELECT * FROM [text]";   }}

View Replies !
Object Reference Not Set To An Instance Of An Object Error
I'm new to ASP.Net and am trying to pull data from the db and populate an excel spreadsheet. I kget this error:Object reference not set to an instance of an object.on this:line 55: For i = 0 To dr.FieldCount - 1Here is my code:Protected Sub On_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click        Dim i As Integer        Dim strLine As String, filePath, fileName, fileExcel        Dim objFileStream As FileStream        Dim objStreamWriter As StreamWriter        Dim nRandom As Random = New Random(DateTime.Now.Millisecond)        Dim Location As String        Dim SDate As String        Dim EDate As String        Location = Request.QueryString("Location")        SDate = Request.QueryString("StartDate")        EDate = Request.QueryString("EndDate")        'Dim fs As Object, myFile As Object        Dim cnn As SqlConnection = New SqlConnection("server=**.**.**.**;uid=******;pwd=******database=***")        'Create a pseudo-random file name.        fileExcel = "NR_Report" & nRandom.Next().ToString() & ".xls"        'Set a virtual folder to save the file.        'Make sure that you change the application name to match your folder.        filePath = "********"        fileName = filePath & "" & fileExcel        'Use FileStream to create the .xls file.        objFileStream = New FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write)        objStreamWriter = New StreamWriter(objFileStream)        'Use a DataReader to connect to the Pubs database.        cnn.Open()        Dim sql As String = "select [Tech Number] = u.user_techNo, Team = u.user_team, Name = upper(u.user_firstName) + ' ' + upper(u.user_lastName), [Total Jobs] = SUM(nr.nr_totaljobs), [Total IRDs] = SUM(nr.nr_totalirds), [IRDs Connected] = SUM(nr.nr_irdsConnected), [IRDs Non-Responding] = SUM(nr.nr_irdsNonResponding), [Percent Non-Responding] = case when SUM(nr.nr_irdsNonResponding) = 0 then 0.00 else round(SUM(cast(nr.nr_irdsNonResponding as decimal) ) / SUM(cast(nr.nr_irdsConnected as decimal)) * 100.00, 2) end from tblUsers u , tblNonResponders nr where u.user_techNo = nr.nr_irtech and u.user_techNo is not null and u.user_team is not null and u.user_office = " & Location & " and u.user_fireDate is null and u.user_suspend is null and nr.nr_reportweek between " & SDate & " and " & EDate & " group by u.user_techno, u.user_firstName, u.user_lastName, u.user_team order by u.user_team"        Dim cmd As SqlCommand = New SqlCommand(sql, cnn)        Dim dr As SqlDataReader        'Try        'dr = cmd.ExecuteReader()        'Catch ex As SqlException        'Response.Write(ex.Message)        'End Try        'Enumerate the field names and records that are used to build the file.        For i = 0 To dr.FieldCount - 1            strLine = strLine & dr.GetName(i).ToString & Chr(9)        Next        'Write the field name information to file.        objStreamWriter.WriteLine(strLine)        'Reinitialize the string for data.        strLine = ""        'Enumerate the database that is used to populate the file.        While dr.Read()            For i = 0 To dr.FieldCount - 1                strLine = strLine & dr.GetValue(i) & Chr(9)            Next            objStreamWriter.WriteLine(strLine)            strLine = ""        End While        'Clean up.        dr.Close()        cnn.Close()        objStreamWriter.Close()        objFileStream.Close()    End SubThanks in advance for any help.

View Replies !
Error: Object Reference Not Set To An Instance Of Object
When I operate like this: "Select APP_DATA node -> Add New Item -> Sql Database ->create a new aspnet.mdf file .However ,I get a error dialogbox like this :: object reference not set to an instance of object .Can someone who know how to solve this problem help me ?Thanks a lot !

View Replies !
HELP! SqlDataSource ~ Object Reference Not Set To An Instance Of An Object
Hi,I'm experiencing a strange problem. here are my code for the error sectionprivate void SaveUpdate()    {        //Create connection object        SqlDataSource ds = new SqlDataSource(s.getConnectionString(), "SELECT * FROM USERACCOUNT WHERE (USERNAME LIKE '" + UserName + "')");
        //Setup connection object        ds.ConnectionString = s.getConnectionString();        ds.UpdateCommand = "UPDATE [USERACCOUNT] SET [ERRORTRY] = @ERRORTRY WHERE [USER_ID] = @USER_ID";        ds.UpdateParameters["ERRORTRY"].DefaultValue = _ErrorTry.ToString();        ds.UpdateParameters["USER_ID"].DefaultValue = _UserID.ToString();
        ds.Insert();        ds.Dispose();    }
Where getConnectionString() is working in other functions.When i run the code the error message are as following
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 162: ds.ConnectionString = s.getConnectionString();
Line 163: ds.UpdateCommand = "UPDATE [USERACCOUNT] SET [ERRORTRY] = @ERRORTRY WHERE [USER_ID] = @USER_ID";
Line 164: ds.UpdateParameters["ERRORTRY"].DefaultValue = _ErrorTry.ToString();
Line 165: ds.UpdateParameters["USER_ID"].DefaultValue = _UserID.ToString();
Line 166:Source File: c:Inetpubwwwroothyperpanelv1App_CodeUserAccount.cs    Line: 164 Anyone have any ideas on what I've done wrong? I can't seems to debug it.Thank you all

View Replies !
Can We Assign DataSet Object To Object Type
Hi Friends,

 I am having a Package scope variable DS of type system.object .In the Script Component which accept this variable as ReadWrite type I am Making the following assignment.

Public Overrides Sub PostExecute()

Variables.DsReport = DsReport // DsReport is a Data Set Object Created and Populated inside the script Component

End Sub

I am getting error while doing this sort of assignment.

Please help me to solve this problem

 

Regards,

Mahe

 

View Replies !
FTP Task: Object Reference Not Set To An Instance Of An Object.
I hit this error when I run the FTP task. I set IsRemotePathVariable = TRUE and RemoteVariable = User::FTPSourcePath where the variable is set with //DMFTP//PE1.JPG in the script task prior to FTP task.

IsLocalPathVariable also set to TRUE and LocalVariable = User::FTPTempPath where the variable is set to c:BiztalkFTPTemp

The FTP Operation is set to Receive Files.

I have tested the task with IsReportPathVariable to False and it works fine.

Can anyone help me and provide some advise on this? Thank you.

View Replies !
ADO.NET SQLExecuteTask --&&> Object Variable Not Set To An Instance Of An Object
Hi all,

 

I am using SQLExecuteTask and kept getting this annoying error

 

ADO.NET SQLExecuteTask --> Object Variable Not Set to an instance of an object

 

it works before and I just recently migrate the project from 32-bit environment to 64-bt.

 

 

View Replies !
Object Reference Not Set To Instance Of The Object While Trying To Sync.
Hi,

I am trying to configure web syncronization using the wizard for a merge replication.

However when I am trying to add users (in authentication mode), I get an exception "Object reference not set to instance of the object ".

Please let me know if you have any inputs on this. It will be highly appreciated..

 

 

 

 

 

View Replies !
Error :Object Reference Not Sent To An Instance Of The Object
Hi,

I get the following error "object reference not set to an instance of the object" while executing reports from the report manager. The report manager UI is also not displayed properly.

Any help in this regard will be appreciated.

 

Thanks in Advance

Viva

 

View Replies !
Error: Object Reference Not Set To An Instance Of An Object
Why am I getting this error?

 

Everything was working fine when I had:

=Fields!UIC.Value Like =Parameters!UIC_Parameter_0.Value & "*"
  =Fields!PAX.Value >= =Parameters!PAX_Parameter_1.Value

 

Then I added:

=Fields!PID.Value = =Parameters!PID_Parameter_2.Value

 

Adding this seemed to do something because now I get the Object Reference not set to an instance of an object error. How do I go about fixing this? Any help is greatly appreciated. Thanks

View Replies !
&"Object Reference Not Set To An Instance Of An Object&" When Retrieving Data/Schema In Design Time
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 finesince one day I started getting "Object reference not set to an instance of an object" messages when I try to designa query or retrieve a schema,  nothing works at design time anymore but at runtime everything is perfect, its a lotof work for me now to create columns,schemas and everything manually, I've tried reinstalling visualstudio, ado componentsbut nothing seems to fix it, did this ever happen to any of you guys?any tip is really appreciated  thanks a lot 

View Replies !
Object Reference Not Set To An Instance Of An Object.
Hi everyone,
I have a problem when I run the code and I'm getting the following error.
 Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:



Line 21: {
Line 22: ConnectionStringSettings pubs = ConfigurationManager.ConnectionStrings["test"];
Line 23: DbConnection connection = new SqlConnection(pubs.ConnectionString);
Line 24: DbCommand cmd = connection.CreateCommand();
Line 25: cmd.CommandType = CommandType.StoredProcedure;Stack Trace:



[NullReferenceException: Object reference not set to an instance of an object.]
sp_test.GridShow_Click(Object sender, EventArgs e) in c:My DocumentsVisual Studio 2005WebSitesWebHelpToolsp_test.aspx.cs:23
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +75
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +98
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4921

 
I tried to check some posts on this subject already.. but I still haven't figured out what's going on.
Any help would be appreciated.
Thanks

View Replies !
Object Reference Not Set To An Instance Of An Object.
Hallow hii
I have a problem could any one help me please, this error which I receive
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.Source Error:



Line 20: "Data Source=MANDARISQLEXPRESS;Initial Catalog=SHOES;Integrated Security=True")
Line 21: DBConnection.Open()
Line 22: sql = "SELECT Count(*) FROM ShoppingCart " & _
Line 23: "WHERE OrderID = '" & Session("OrderID") & "' " & _
Line 24: "AND ProductID = '" & FVProductID.Text & "'"
And this is my source code, please I have try but I don see any error please help me guysDBConnection = New SqlConnection( _"Data Source=MANDARISQLEXPRESS;Initial Catalog=SHOES;Integrated Security=True")
DBConnection.Open()
sql = "SELECT Count(*) FROM ShoppingCart " & _"WHERE OrderID = '" & Session("OrderID") & "' " & _
"AND ProductID = '" & FVProductID.Text & "'"DBCommand = New SqlCommand(sql, DBConnection)
If DBCommand.ExecuteScalar() = 0 Then
 SQLAddString = "INSERT INTO ShoppingCart (OrderID, ProductID, OrderDate, ProductName, ProductQnty, ProductPrice) VALUES (" & _
"'" & Session("OrderID") & "', " & _"'" & FVProductID.Text & "', " & _
"'" & Today & "', " & _"'" & FVProductName.Text & "', " & _
"'" & FVProductPrice.Text & "', 1)"DBCommand = New SqlCommand(SQLAddString, DBConnection)
DBCommand.ExecuteNonQuery()
 
End If
DBConnection.Close()

View Replies !
Object Reference Not Set To An Instance Of An Object
Hi Everyone,
I have a simple webform with few textboxes that saves data to a sql database.  I was able to retrieve and save data successfully until i added few more dropdownlists and other text boxes.  Now, when i try to hit my Add button to send all the data in the textboxes to the database, i am getting this error:
Object reference not set to an instance of an object.
Line 121:        Dim myServer As New ServersDPLine 122:        Dim serverRow As Servers.SERVERINFORowLine 123:        serverRow = dsServers.SERVERINFO.NewSERVERINFORowLine 124:        serverRow.Name = txtName.TextLine 125:        serverRow.IP = txtIPAddress.Text
[NullReferenceException: Object reference not set to an instance of an object.]   MicaServerInfo.ServerDetail.btnAdd_Click(Object sender, EventArgs e) in C:InetpubwwwrootMicaServerInfoServerDetail.aspx.vb:123   System.Web.UI.WebControls.Button.OnClick(EventArgs e)   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)   System.Web.UI.Page.ProcessRequestMain()
I am not sure why this is happening.  I have seen this error before but not when dealing with database stuff.  Please help me or guide me to how to find this error. 
Thanks a lot,
kevin

View Replies !
Help: Object Reference Not Set To An Instance Of An Object.
I am getting the Object reference not set to an instance of an object. error. Here is the code:


string conString;
conString = ConfigurationSettings.AppSettings["anonConnection"];


SqlConn = new SqlConnection(conString);
SqlComm = new SqlDataAdapter("usp_SelectProductList", SqlConn);

SqlComm.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure;

SqlComm.InsertCommand.Parameters.Add(new SqlParameter("prod_type", SqlDbType.VarChar, 20));
SqlComm.InsertCommand.Parameters["prod_type"].Value = m_productType;


DataSet dsProducts = new DataSet();
SqlComm.Fill(dsProducts, "Products");


here is the error:


Line 46: SqlComm = new SqlDataAdapter("usp_SelectProductList", SqlConn);
Line 47:
Line 48: SqlComm.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure;
Line 49:
Line 50: SqlComm.InsertCommand.Parameters.Add(new SqlParameter("prod_type", SqlDbType.VarChar, 20));


[NullReferenceException: Object reference not set to an instance of an object.]
Yocaher.Products.SelectProductList() in e:inetpubwwwfndflyocaherclassesclsproducts.cs:48
Yocaher.products.Page_Load(Object sender, EventArgs e) in e:inetpubwwwfndflyocaherproducts.aspx.cs:30
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +29
System.Web.UI.Page.ProcessRequestMain() +724



any help would be GREATLY appreciated!

View Replies !
Help -Object Reference Not Set To An Instance Of An Object.
i m new for asp.net

when i run app. i got this error,

---------------
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 49:
Line 50: adpt.Fill(ds, "SMS_student_class_master")
Line 51: txt.Text = ds.Tables.Item("roll_no").ToString
Line 52: con.Close()
Line 53: End Sub


Source File: c:inetpubwwwrootaspnetsmsassignment_d.aspx.vb Line: 51
------------------

my source code given below,

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsNothing(Request.QueryString("id")) Then
sid = Request.QueryString("id")
End If
Dim con As New SqlConnection
Dim constr As String
Dim cmd As New SqlCommand
Dim ds As New DataSet
Dim adpt As New SqlDataAdapter

constr = "data source=Baroda;user id=sa;password=;" & _
"initial catalog=SMS;persist security info=False;workstation id=Baroda;Packet size=4096"
con.ConnectionString = constr
con.Open()

cmd.CommandText = "SELECT * FROM SMS_student_class_master WHERE " & _
"stud_id='" + sid + "'"
cmd.Connection = con
adpt.SelectCommand = cmd

adpt.Fill(ds, "SMS_student_class_master")
txt.Text = ds.Tables.Item("roll_no").ToString
con.Close()
End Sub
---------

what should i do?
anyone have any idea?
plz give solution.
its urgent.

thanks in advance.

View Replies !
Object Reference Not Set To An Instance Of An Object
Hi guys,
I'm struggling here with this error that I'm sure is a no brainer to someone else.
I'm trying to call a stored procedure in SQL Server that will INSERT a new record with the values I pass in.

Can anyone see the mistakes I'm making?

Also when I do get the INSERT sp to work, can I return the id (autonumber) of the new record?

Thanks,

Ray :)


Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:
Line 75: 'Set the command type as StoredProcedure.
Line 76: MyDataAdapter.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure


This is a chunk of the code I'm trying...


Function AddNewCustomerContactDetails(ByVal firstname As String, ByVal lastname As String) As Integer
Dim DS As System.Data.DataSet
Dim MyConnection As System.Data.SqlClient.SqlConnection
Dim MyDataAdapter As System.Data.SqlClient.SqlDataAdapter

'Create a connection to the SQL Server.
MyConnection = New System.Data.SqlClient.SqlConnection("server=(local);database='OMI1';Trusted_Connection=yes")
'Create a DataAdapter, and then provide the name of the stored procedure.
MyDataAdapter = New System.Data.SqlClient.SqlDataAdapter("sp_AddNewContactInfos", MyConnection)

'Set the command type as StoredProcedure.
MyDataAdapter.InsertCommand.CommandType = System.Data.CommandType.StoredProcedure


'Create and add a parameter to Parameters collection for the stored procedure.
MyDataAdapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@firstname", System.Data.SqlDbType.VarChar, 20))
'Assign the search value to the parameter.
MyDataAdapter.InsertCommand.Parameters("@firstname").Value = firstname

MyDataAdapter.InsertCommand.Parameters.Add(New System.Data.SqlClient.SqlParameter("@lastname", System.Data.SqlDbType.VarChar, 20))
MyDataAdapter.InsertCommand.Parameters("@lastname").Value = lastname

'Try
MyDataAdapter.InsertCommand.ExecuteNonQuery
'finally
MyDataAdapter.Dispose() 'Dispose of the DataAdapter.
MyConnection.Close() 'Close the connection.
'End Try

'Return GetIDNumber(firstname, lastname)

End Function

View Replies !
Object Reference Not Set To An Instance Of An Object.
hi,
my code was running fine. i m adding data to my table. but the same code
giving the error as i read data from fields. following is the code and the line no.
where the error generates

strSQL = "INSERT INTO Company VALUES ('" & lblCompanyID.Text & "','" & txtCompanyName.Text & "','" & txtStreet.Text & "','" & txtCity.Text & "','" & txtZip.Text & "','" & cboStates.SelectedItem.Text & "','" & cboCountry.SelectedItem.Text & "','" & txtPhone.Text & "','" & txtFax.Text & "','" & txtEmail.Text & "')"
DBRead.Close()
DBComm = New OleDbCommand(strSQL, myConn)
DBRead = DBComm.ExecuteReader()


--------
on the line where Insert query save in strSQL error occurs:
" Object reference not set to an instance of an object. "

any suggestion.

- Regards
Danish

View Replies !
Object Reference Not Set To An Instance Of An Object.
myCom.Parameters.Add(New sqlParameter("@FirstName",sqlDbType.VarChar,50))

If smbd knows whats wrong with this part of code, please correct me:)

Complite source:



 <%@ Page Language="vb" Debug="true" %>
<%@ Import NameSpace = "System.Data" %>
<%@ Import NameSpace = "System.Data.SqlClient" %>

<script runat="server">
Sub sqlSaveForm(s as Object, e as EventArgs)
Dim myCon As SqlConnection
Dim myCom As SqlCommand
Dim sqlString As String

If isValid Then
'Save form
myCon = new

SqlConnection("server=localhost;uid=sa;pwd=secret;database=myData")
sqlString = "Insert Into serveys( s_firstname,s_lastname,s_favColor)" _
& "Values(@firstname,@lastname,@favcolor)"
myCom.Parameters.Add(New sqlParameter("@FirstName",SqlTypes.SqlString,50))
myCom.Parameters.Add(New sqlParameter("@LastName",sqlDbType.VarChar,50))
myCom.Parameters.Add(New sqlParameter("@favcolor",sqlDbType.VarChar,50))



myCom.Parameters("@FirstName").Value = firstName.Text
myCom.Parameters("@LastName").Value = LastName.Text
myCom.Parameters("@favColor").Value = favColor.SelectedItem.Text

myCon.Open()
myCom.ExecuteNonQuery()
myCon.Close()

'Redirect
Response.Redirect("Thankyou.aspx")
End if
End Sub
</script>





<html>
<head><title>Customer Survey</title></head>
<body>

Please complete the following form:

<form runat="server">
<p> First Name
<br><asp:TextBox id="firstname" RunAt = "server"/>
<asp:RequiredFieldValidator
ControlToValidate = "firstname"
RunAt="server">
You must enter your first name!
</asp:RequiredFieldValidator>

<p> Last Name
<br><asp:TextBox id="Lastname" RunAt = "server"/>
<asp:RequiredFieldValidator
ControlToValidate = "Lastname"
RunAt="server">
You must enter your Lastname!
</asp:RequiredFieldValidator>

<p>Favorite Color:
<br><asp:DropDownList id="favColor" Runat="server">
<asp:ListItem>Red</asp:ListItem>
<asp:ListItem>Green</asp:ListItem>
<asp:ListItem>Blue</asp:ListItem>
</asp:DropDownList>
<p>
<asp:button runat="server" text = "Submit Survey" OnClick = "sqlSaveForm"/>
</form>
</BODY>
</HTML>

View Replies !
Object Reference Not Set To An Instance Of An Object
Hi

I m trying to access a server report through report viewer control. I got the error

"Object reference not set to an instance of an object". I have administrator rights on the reporting server. My code is as follows:

ReportViewer.ServerReport.ReportPath = "/Reportfolder/reportname"

ReportViewer.ServerReport.ReportServerUrl = New System.Uri("http://servername/ReportServer", System.UriKind.Absolute)

ReportViewer.RefreshReport()

I have created this report using Business Intelligence Projects. I am using textboxes and rectangles throughout the report. When I compile and run the project through Business Intelligence Studio, it works very fine, but when I try to access it through direct url or by report viewer control, it gives the above mentioned error.

Any help in this regard will highly be appreciated.

View Replies !
Object Reference Not Set To An Instance Of An Object
I get this message when I try to create a new SSIS package. VS BIDs was recently installed by our IS. Any idea what's wrong? Thanks.

 

Jeff

View Replies !
Object Reference Not Set To An Instance Of An Object
Hi,

 

When I try to load a package in Intergration services in SQL 2005, I am getting and error "Microsoft Visual Studio is unable to load this document, Error Loading package.dtsx: Object reference not set to an instance of an object" can any one please help me in getting this solved.

 

Thanks

 

Rajeev

View Replies !
Object Reference Not Set To An Instance Of An Object
I got the subject error when I try to add user or a group in the Reporting Services - Server Properties.
 
Help is much appreciated.
 
IS
 

View Replies !
Object Reference Not Set To An Instance Of An Object.
Folks

I had to take the report server offline temporarily-- I have brought it back online and stopped and restarted ssrs not I get the dreaded Object reference not set to an instance of an object.Error.  I can log into the report server via a browser just fine.  Its when I try and access any report I get error message and the report is all jarbled up--attributes of the report are not where they should be

Help!!! I  reloaded one of the reports and still get the error any suggestions??

thanks

KM

View Replies !
Object Reference Not Set To An Instance Of An Object
Ok, heres the problem im having. I'm trying to setup a Dyniamic CRM server for my small business and I've run into a problem with the SQL Reporting server that I've been unable to find the answer to. I'm running server 2003 with SQL server 2005, Exchange server 2003 and I have everything installed to the specifications of the CRM software but when it tries to verify all the services it give me the error "Object reference not set to an instance of an object" when trying to verify the reporting server is correct. I can access it through IE and Firefox with no problems whatsoever but during the configuration before the install  I get this error and cannot continue. any help to fix this problem would be greatly appreciated. I can only figure that something was set wrong or the permissions arent set correctly but I can't figure out where to go from here. TIA

View Replies !
Object Reference Not Set To An Instance Of An Object
I enter http://localhost/reportserver and get the error message from Reporting Services::  "Object reference not set to an instance of an object"  along with a link to Get Online Help.  I click the link to get the "Details" and am told "We're sorry, there is no additional information in the error logs or knowledge base.

I've run the RS Configuration Manager many times to try different options,  I've also run SQL Server Config Mgr. and the Reporting Services seems OK and is "running."   I've checked IIS and the virtual "reportserver" look OK there as well....  I just don't see anything amiss or missing.

I'm running XP Pro, Visual Studio 2005, SQL Server 2005 and think I am up to date on all the latest upgrades.  In VS 2005 I am able to create tables and access data in both SQL as well as Access.  I also use the LogIn features in my Web Forms.  So, all my servers appear to be alive and well.  

The second place where I fall apart is trying to DEPLOY a Report that fails with this huge Error message that says "Client found response content type of 'text/html, charset=utf-8', but expected 'text/xml'  which was followed with a full screen full of <htnl> as an error message. 

So, I can't dialog with the server, and I can't deploy a report to the server.  But, I can configure it, start it, stop it, etc. etc.  The answer is somewhere in the configuring, I guess, but I'm at a loss.  I sure could use some guidance....  It would be most appreciated....

Thanks in advance..... Frank

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved