very easy I'm sure...
On the return statement, I get the object reference not set to an instance
of an object exception. I fully typed out the object paths for clarity,
i.e., the application blocks and the configuration settings.
thank, Eric
private int LogTransfer(string FileName, string Email, string UserName,
int Direction)
{
// Set up our 4 parameters
SqlParameter[] arParms = new SqlParameter[4];
arParms[0] = new SqlParameter("@filename", SqlDbType.VarChar, 200 );
arParms[0].Value = FileName;
arParms[1] = new SqlParameter("@email", SqlDbType.VarChar, 200);
arParms[1].Value=Email;
arParms[2] = new SqlParameter("@ssiuser", SqlDbType.VarChar, 200);
arParms[2].Value=UserName;
arParms[3] = new SqlParameter("@type", SqlDbType.SmallInt );
arParms[3].Value= Direction;
return (int)Microsoft.ApplicationBlocks.Data.SqlHelper.Ex ecuteScalar(
System.Configuration.ConfigurationSettings.AppSett ings.Get("ConnectionString
"),
CommandType.StoredProcedure,
"webdata.dbo.usp_di_webFileTransferLog",
arParms);
} 1 3357
Thank you, I did not mention it but I also tried replacing the
AppSettings.Get() method with the connection string itself. The exception
did not stop.
Eric
Richard wrote: You'll get the exception if your AppSettings files doesn't have an entry for "ConnectionString"... --> Case sensitive and spelled correctly else null is returned...
--Richard
"Eric Sabine" wrote:
very easy I'm sure...
On the return statement, I get the object reference not set to an instance of an object exception. I fully typed out the object paths for clarity, i.e., the application blocks and the configuration settings.
thank, Eric
private int LogTransfer(string FileName, string Email, string UserName, int Direction) { // Set up our 4 parameters SqlParameter[] arParms = new SqlParameter[4]; arParms[0] = new SqlParameter("@filename", SqlDbType.VarChar, 200 ); arParms[0].Value = FileName; arParms[1] = new SqlParameter("@email", SqlDbType.VarChar, 200); arParms[1].Value=Email; arParms[2] = new SqlParameter("@ssiuser", SqlDbType.VarChar, 200); arParms[2].Value=UserName; arParms[3] = new SqlParameter("@type", SqlDbType.SmallInt ); arParms[3].Value= Direction;
return (int)Microsoft.ApplicationBlocks.Data.SqlHelper.Ex ecuteScalar(
System.Configuration.ConfigurationSettings.AppSett ings.Get("ConnectionString "), CommandType.StoredProcedure, "webdata.dbo.usp_di_webFileTransferLog", arParms); } This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Vitling |
last post by:
For no apparent reason, a NullReference exception is thrown in
system.dll
(System.Net.Sockets.OverlappedAsyncResult.CompletionPortCallback).
Since I only get a disassembly from Visual Studio, it...
|
by: muralidharan |
last post by:
WebForm1.aspx Code:
<%@ Register TagPrefix="ComponentArt" Namespace="ComponentArt.Web.UI"
Assembly="ComponentArt.Web.UI" %> <ComponentArt:TreeView
id="TreeView1" Height="520"...
|
by: I am Sam |
last post by:
I keep getting the following exception error:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the
current web request....
|
by: I am Sam |
last post by:
I keep getting the following error message when I try to iterate through a
CheckBoxList control:
Object reference not set to an instance of an object.
Description: An unhandled exception...
|
by: Chuck Hartman |
last post by:
I have a Windows service that requests web pages from a site using an
HttpWebRequest object. When I try to request a page from an ASP.NET 2 site,
I get a WebException with message "The remote...
|
by: Supra |
last post by:
i got error problem..........
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of...
|
by: Sridhar |
last post by:
Hi,
I have created a web application. I have a data access dll to interact
with database. I added this dll as a reference to the web application. Now
let's say if I am calling a function in data...
|
by: Ganesh Palaniappan |
last post by:
We're getting following exception for the below piece of code. We're wondering how it is possible since we're having a null check for objGraphics and strokePen...
Exception:...
|
by: Tamer Ibrahim |
last post by:
Hi,
Sometimes, I got the following error message when I use ajax calendar
control on some aspx pages :
Object reference not set to an instance of an object.
Description: An unhandled exception...
|
by: raghudr |
last post by:
Hi all,
I am coding for displaying a splash screen until a big job is
finished.I am getting an exception:only during the first start of the
system.Rest all the time
it is working fine.
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |