| RecordStateChanged Object reference not set to an instance |
|
 |
Index ‹ DotNet ‹ ADO
|
- Previous
- 1
- 2
- 3
- Microsoft Project >> Fill "Resource Usage" View using VBAHi,
I'm trying to fill the "Resource Usage" View with some data imported from
Excel or Clipboad.
To figure out how this works I recorded some macros and tried to understand
the vba code generated.
I understand what codelines like the following mean:
ActiveProject.Resources.UniqueID(1).Assignments.UniqueID(2097156).TimeScaleData(StartDate:="18.12.07 00:00", EndDate:="19.12.07
00:00", Type:=8, TimeScaleUnit:=4, Count:=1).Item(1).Value = "8"
But I have no idea how the "Assignments.UniqueID(2097156)" ist generated.
What ist the logic behind this 7-digit number? First I was thinking about a
time- or date-code..
Or is there any other possibility to fill this form, without knowing this
UniqueID 7-digit number?
THX in advance
cu Markus
- 4
- Dotnet >> Plugins and Late BindingHi,
I have some code to load some plug-ins, but the code requires me to know
the name of the class to load (here: SamplePlugin, derived from IPlugin) :
(Here is some C# code, but I use VB.Net to code my program)
using System;
using System.Reflection;
public class Driver
{
static void Main()
{
Assembly assembly = Assembly.LoadFrom ("myplugin.dll");
Type t = assembly.GetType ("SamplePlugin");
IPlugin plugin = (IPlugin) Activator.CreateInstance(t);
plugin.SayHello();
}
}
The problem is, I don't want to have to know the name of the class I want to
load... I want to load the new module and get an instance of the class that
derives IPlugin. Is there a way to do so?
In C++ for the same purpose, I had a win32 dll with an extern function that
returned an instance of the contained class, so I loaded the dll, called the
function and I was ready to proceed. Is there something similar I can do
with .NET class libraries?
thanks
- 5
- Dotnet >> can't handleDear all,
I have a problem with a software I have created with .Net F1.1. I have
uninstalled an old version of the software and installed a new one.
Only 1 computer gives me the error:
"can't handle, there is something unexpected from the application"
I have tried to uninstall again and install again, change the name of the
assembly and other things, but I have no idea how to handle this problem,
that happens always and only for that computer.
Has anyone experience in this situation?
Thank you,
Bart
- 6
- Dotnet >> visual studio update on winserver2003Hi fellows,
I am experiencing a problem while I try to update Visual Studio.NET 2003
on Windows Server 2003.
It tells me tha it is impossibile to connect to the update site. It
doesn't matter if I do it from the Visual Studio menu or from the
windows "add/remove applications" control panel applet.
I suspect it is due to the enhanced protection for Internet Explorer...
I do not want to disable it, I hope there's a way to "trust" Visual
Studio update site...
Windows Update works well...
Any suggestion is greatly appreciated.
Thanks in advance,
Andrea
- 7
- Dotnet >> Output Type missing from Project Properties pageHello,
I'm just learning C# on visual C# .net (my apologies if
this is not the apropriate forum for this question), and
I'm having a problem when I create empty windows
applications. Whenever I create an empty project it
automatically creates it as a console application,
instead of a windows application. There is supposed to
be an "Output Type" property in my project's property
pages that is attached to a compiler switch, but it
simply is not there. All the other properties are -
Assembly Name, Default Namespace, etc. Has anyone else
seen this phenomenon, and does anyone know how to fix
it? I'd really like to create practice programs without
the annoying consule window popping up first.
Thanks,
Nate
- 8
- Visual C#.Net >> Release build error LNK2019Hi,
I think it is a FAQ but I found no answer to my problem.
I created a C# program that called some C++ legacy code.
I created 2 projects :
1) a DLL (IPRCommWrapper.dll) including an unmanaged C++ wrapper for
legacy code and a managed C++ wrapper to allow C# to call this unmanaged
wrapper
2) a C# Win application
In Debug mode, everything works fine.
When I try to build in release mode, I have the following error :
"libcmt.lib(crt0.obj) : error LNK2019: unresolved external symbol _main
referenced in function _mainCRTStartup".
here is the output from the build log :
Creating temporary file
"c:\Projects\IPRManaged\IPRCommWrapper\Release\RSP000017.rsp" with
contents
[
/OUT:"C:\Projects\IPRManaged\Release\IPRCommWrapper.dll" /INCREMENTAL:NO
/NOLOGO /DLL /DEBUG
/PDB:"C:\Projects\IPRManaged\Release/IPRCommWrapper.pdb" /NOENTRY
/FIXED:No /noentry nochkclr.obj mscoree.lib pcomm.lib kernel32.lib
user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "\Program
Files\Microsoft Visual Studio .NET 2003\Sdk\v1.1\Lib\mscoree.lib"
- 9
- Visual C#.Net >> Outlook access Pop-upHi,
I have written a console application which accesses
emails stored on outlook and information about them into
SQL Server.
The program works but I have click yes to all the pop-ups
that appear to say another program is trying to access
outlook. Is there a way to stop this pop-up from
appearing as ideally I want to move this application onto
the server to work with exchange instead of the client
outlook.
- 10
- Net Framework >> Can "InitializeComponent()" info be capturedHi there,
Don't know if I picked the correct NGs or not but maybe someone can steer me
in the right direction. Does anyone know if a class exists to capture the
same info now wrapped in "InitializeComponent()". I want to capture all form
details for a given form at design time (properties and controls) but I
can't find anyway to do it. Note that reading a form's ".resx" files won't
do either (it's only good for localized forms but in any case, it doesn't
always provide complete info). Thanks very much.
- 11
- Winforms >> File Open DialogI have a VB2005 program that has to import data from a 3.5 floppy drive and
USB drives. I use a file open dialog to choose the file, works great. The
problem occurs the next time I wish to open a file. If the last import was
done from a floppy drive the program looks for a floppy drive first and if
it has been removed I get an error. While I could just catch the error, I
would rather know how to avoid it. Something similar happens with USB
drives, if I import from a USB drive, the USB drive cannot be safely removed
until the program is ended. The initial directory of the file open dialog
is set to a C drive directory. It just seems that the program is not
releasing the last used drive until the program is exited. Can someone tell
me what I should do?
Thanks,
Thomas
With dlgFileOpen
.InitialDirectory = strAppPath & "Imports\"
.Multiselect = False
.Filter = strFilterExt
.FileName = strDefaultFile
.FilterIndex = 1
.Title = strOpenTitle
.ShowDialog()
End With
funGetFileName = dlgFileOpen.FileNames(0)
--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
- 12
- Dotnet >> VS.Net and HTML Form Field Level HelpWe are using Doc-to-Help 6.5 to produce HTML 1.x help for a Visual
Studio.Net Windows application. We want the Help files to remain on our
Intranet server. In my VS.Net project I've added a HelpProvider on each
form. I then set the Namespace to the http location of the .htm file related
to the form. When the user hits F1 voila the .htm page gets displayed in the
IE browser.
My question relates to context-sensitive help at the form field level. Is
there a way to reference the bookmarks within the .htm page (i.e.
http://...form.htm#firstfield) or does each form field need to have a
separate .htm file ? and such do I need to alter the Namespace each time
accordingly? This will place considerable burden on the Doc-to-Help team to
have to manage a file for each form field.
Any assistance in this design issue would be appreciated.
- 13
- Dotnet >> Performance Counter not workingHello,
I wrote an application in c# .net 2.0. The application monitors the network
speed of a networkinterface. If I install the application at another pc with
the .net framework installed, the application won't run. The performance
counter can initialize itself but the value of bytes recieved for example is
always 0.
What should I do? Thanks
- 14
- Net Framework >> Application.RunHi
I have an app which starts using Application.Run(...........);
I want to create a logon screen, prior to the main app running, so I
modified my main() to look similar to
frmLogon logon = new frmLogon();
logon.ShowDialog();
//Check for valid logon
// If valid logon, start the main app
Application.Run(new frmMain());
logon=null;
My question is..... why do I need to use Application.Run ??
Should my logon prompt reside IN the application.run form, or outside it??
Thanks
Paul
- 15
- Visual C#.Net >> Static Variables.Hi,
I have a pretty basic question.
I have a C# control with lots of classes and I need few instances(manager
classes) shared by all the classes in the conrol. So I define a Static Class
and it works OK.
Now When I want multiple instances of the control in the same application
and each instance to have it own set of manager instances, how do I do it?
Static is shared between the two instance of the control, which I want to
avoid.
Is there a specific variable type or a standard design pattern for it?
Thanks & Regards,
Gobi.
|
| Author |
Message |
TamerHesham

|
Posted: Tue May 03 17:43:27 CDT 2005 |
Top |
ADO >> RecordStateChanged Object reference not set to an instance
Object reference not set to an instance of an object.
at System.Data.DataTable.RecordStateChanged(Int32 record1, DataViewRowState
oldState1, DataViewRowState newState1, Int32 record2, DataViewRowState
oldState2, DataViewRowState newState2)
at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
DataRowAction action, Boolean isInMerge)
at System.Data.DataRow.SetNewRecord(Int32 record)
at System.Data.DataRow.EndEdit()
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
value)
at System.Data.DataRowView.set_Item(String property, Object value)
at Lumedx.CardioDoc.UDF.CheckBoxAdapter.checkBox_CheckStateChanged(Object
sender, EventArgs e)
I get the above exception when I try to change the value of a column of a
data row view in the CheckStaeChanged event. The column is the same one the
checkbox's CheckState is bound to.
DotNet323
|
| |
|
| |
 |
Val

|
Posted: Tue May 03 17:43:27 CDT 2005 |
Top |
ADO >> RecordStateChanged Object reference not set to an instance
Hi Sankar,
This error means that your reference to the datarow or datacolumn probably
is Nothing and you try to change a value for it. Try to debug a code and see
if it is not a Nothing
--
Val Mazur
Microsoft MVP
http://xport.mvps.org
"Sankar Nemani" <EMail@HideDomain.com> wrote in message
news:u0x00u$EMail@HideDomain.com...
> Object reference not set to an instance of an object.
> at System.Data.DataTable.RecordStateChanged(Int32 record1,
> DataViewRowState oldState1, DataViewRowState newState1, Int32 record2,
> DataViewRowState oldState2, DataViewRowState newState2)
> at System.Data.DataTable.SetNewRecord(DataRow row, Int32 proposedRecord,
> DataRowAction action, Boolean isInMerge)
> at System.Data.DataRow.SetNewRecord(Int32 record)
> at System.Data.DataRow.EndEdit()
> at System.Data.DataRow.set_Item(DataColumn column, Object value)
> at System.Data.DataRowView.SetColumnValue(DataColumn column, Object
> value)
> at System.Data.DataRowView.set_Item(String property, Object value)
> at
> Lumedx.CardioDoc.UDF.CheckBoxAdapter.checkBox_CheckStateChanged(Object
> sender, EventArgs e)
>
> I get the above exception when I try to change the value of a column of a
> data row view in the CheckStaeChanged event. The column is the same one
> the checkbox's CheckState is bound to.
>
>
|
| |
|
| |
 |
| |
 |
Index ‹ DotNet ‹ ADO |
- Next
- 1
- 2
- Visual C#.Net >> ClickOnce including filesI have an application that is deployed with ClickOnce. The app has uses some
Crystal Reports files but they are not part of the application, but just
stored in a Reports directory. They are not classes within the project.
To display a report, the program
1. Gets a reference to the file from the selection in a dropdown box
2. Creates/instantiates a report document
3. Loads the the report into the document rptDoc.load(<file path>)
4. does some stuff (authentication,parameters, ect)
5. Assigns it as the ReportViewer's report source
works fine, but when I add the rpt files to the project, it wants to treat
them as reports and create a class for each with a code file.
I just need to get the report files copied to the app data directory when
the app is deployed so I don't have to rewrite all the code.
Can anyone suggest how to do this??
tia
Walter
- 3
- Visual C#.Net >> deployment relatedi have created deployment package using setup wizard. In user Interface
editor there are some predefined add dialog box are available. I want to add
new dialog box which is not in add dialog box pane. How to do that. Pls tell
me
- 4
- Visual C#.Net >> creating mailboxes on exchange 2003 clustersI use C# to connect a database with student information directly to the
Active Directory (2003). This means that as the student is enlisted an
account and mailbox is created in the active directory. Creating users is
flawless en mailbox creating went perfect against a single exhange server
using code from KB article 313114 of which part is displayed below.
mailbox = (IMailboxStore)user.NativeObject;
mailbox.CreateMailbox(homeMDB);
user.CommitChanges();
Now I need to let this code run against an exhange cluster and I can't get
it to work. It gives "There is no such object on the server" errors. I
personally think that somhow the homeMDB url is incorrect. But I can't find
any information on what the differences might be between the path on a
cluster or 'normal' exchange machine. I traced the path using ldap browsers
and it looks to be correct.
Any insights are welcome.
- 5
- 6
- ADO >> Connection Pool error.I am getting the following SQL exception:
Error: ReadSessionData: Error 1 - Type:
System.Data.SqlClient.SqlException
Source: .Net SqlClient Data Provider
Target Site: System.Data.SqlClient.SqlInternalConnection
GetConnection(Boolean ByRef)
Description: General network error. Check your network
documentation.
Stack Trace: at
System.Data.SqlClient.ConnectionPool.GetConnection
(Boolean& isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledCon
nection(SqlConnectionString options, Boolean&
isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
at visa.dps.ppc.data.SessionInfoRequest.Execute()
The root seems to be a General network error. Does anyone
know the cause? I can connect with the database with
Enterprise Manager and the database seems intact. I can't
figure out why I am getting this error. It seems to occur
the most when I install a new version of my application.
Once the application runs once without error it seems that
this error goes away. Any ideas?
Thank you.
Kevin
- 7
- ADO >> checking for valid connectionHi,
Today we had a thunder storm with lightening/torrental rain the works the
process of which seemed to screw up my 4-port network hub. At the time I was
testing my Windows app which uses a SQL Server database, I changed something
in the UI that required DB access and since by hub had gone it couldn't get
access.
The result was my application hung and I had to use task manager to end it.
So the question is what is the best way to program against this using
VB.NET/ADO.NET?
Have a separate thread that periodically prods the connection to make sure
it's okay, something else?
Regards,
Peter
- 8
- 9
- Visual C#.Net >> interface implementation and inheritance.Is it a good idea(or is it possible) for to implement half an
interface in base class and half in derived class.
e.g Interface IMyinterface has 3 properties.
Class B and C inherit class A, and implement implement IMyinteface.
Class A implements Propety1 of the interface IMyinterface
and class B and Class C implement property 2 and 3.
- 10
- Visual C#.Net >> Regular Expression HelpI've been looking at regular expression examples and can't seem to find what
I am looking to do. Is there a regular expression that can test the following?
1. Contain at least 1 lowercase letter.
2. Contain at least 1 uppercase letter.
3. Contain at least 1 number
4. Contain at least 1 special character (i.e. *, &, %, #, etc).
5. Be at least 8 characters in length
- 11
- Net Framework >> Prevent another thread?From a particular WindowsIdentity I need to create a Kerberos token (WSE 2.0)
for a SOAP message:
impersonatedUser = windowsIdentity.Impersonate();
// create Kerberos token
impersonatedUser.Undo();
How can I make sure that other threads does not do stuff while I'm
impersonating on this particular thread? Can I get a list of threads and
pause them all?
Niels
- 12
- Visual C#.Net >> c# asp.net credit card processingI have just started a project that's going to do very heavy credit card
processing through asp.net and i had some questions. I've never really done
any cc processing through code and I wasn't sure where to get started. Can
anyone suggest a particular gateway or cc processor? I saw a component called
.net charge that seems really promising, has anyone used it?
Have any of you done a full e-commerce site and have some suggestions? What
is best tou use with .net and/or best for the money? The app will have to be
able to bill,refund, and recurring bill. I know I can probably code that
manually if i get the general ideas about how .net cc processing would work.
Thanks for any help.
- 13
- Visual C#.Net >> Simple Color Pallete control?I need a simple color pallete control, similar to one that exists in
appearance section in dialog properties. Here is a screenshot:
http://tinyurl.com/y6m78k
I tried using ColorDialog but there doesn't seem to be a way to have only a
couple of colors displayed. Is there a way to customize ColorDialog so that
it only displayes several colors I chose? If not I would appreaciate if
somebody could give me a few pointers on how to create such a control
myself. Thanks in advance.
James
- 14
- Net Framework >> Dotnet 2.0 bug ? Retrieving security permissions of a desktop foldHello,
If I get the ACL of a folder on the desktop, or for example "C:\My
Documents", I do not get the correct security settings. When I check the
security using the properties dialog with the windows explorer the right:
"Read" is true.
But when I check using the code below it returns false because the Read
right is checked twice (the first time it is set to true, the second time it
is set to false ??).
// << code example
DirectoryInfo^ dInfo = gcnew DirectoryInfo("C:\\Documents and
Settings\\USR\\Desktop\\Test2");
DirectorySecurity^ dSecurity = dInfo->GetAccessControl();
AuthorizationRuleCollection^ myAc2 = dSecurity->GetAccessRules(true,
true, SecurityIdentifier::typeid);
for (int j = 0; j < myAc2->Count; j++)
{
AuthorizationRule^ ac2 = myAc2[j];
FileSystemAccessRule^ rule2 = dynamic_cast<FileSystemAccessRule^>(
ac2 );
if ( currentWI->User->Equals(
dynamic_cast<SecurityIdentifier^>(rule2->IdentityReference)) ) {
if ( AccessControlType::Allow.Equals( rule2->AccessControlType ))
{ // THIS is code is reached TWICE when dealing with a 'special'
// folder (desktop or My documents) while with a normal folder
// (say d:\temp) it is reached only once. The first time
bReadRights
// is set to true (OK) but the second time the value of
bReadRights
// is set to false
bool bReadRights = (((int)rule2->FileSystemRights &
(int)FileSystemRights::Read ) == (int)FileSystemRights::Read);
}
}
}
// >> code example
Can anyone help me with this problem ?
Thanks in advance,
martin
- 15
- Visual C#.Net >> entering an array of numbers into an arraylistThis is a multi-part message in MIME format.
------=_NextPart_000_0006_01C55160.F9C05950
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I have a situation where a user must enter three int results into three =
textboxes, save that entry and enter another set. All sets have to be =
displayed in another box or grid, and when the collection of data is =
complete, the array of arrays must be saved.
I created an array and populated the elements:
string[] stat =3D new string[3];
stat[0] =3D txt1.Text.ToString();
stat[1] =3D txt2.Text.ToString();
stat[2] =3D txt3.Text.ToString();
And added this array to the arraylist:
stats.Add(new stat());=20
stats.Count tells me that I am adding another array to the list whenever =
I btn_Click
lblResults.Text =3D"The count is: " + stats.Count + "\n";
But I cannot iterate through the arraylist to see the results.
for( i=3D0; i!=3Dstats.Count; i++)
{
string result =3D stats[0].ToString();
lblResults.Text +=3D result + "\n";
}
The question, I think, is how do you unbox and array from an arraylist? =
Or is there a better way to do this? :>)
Many Thanks,
Harry
------=_NextPart_000_0006_01C55160.F9C05950
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2900.2627" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>I have a situation where a user must =
enter three=20
int results into three textboxes, save that entry and enter another set. =
All=20
sets have to be displayed in another box or grid, and when the =
collection of=20
data is complete, the array of arrays must be saved.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>I created an array and =
populated the=20
elements:</STRONG></FONT></DIV>
<DIV>
<P><FONT face=3DArial size=3D2>string[] stat =3D new =
string[3];</FONT></P>
<P><FONT face=3DArial size=3D2>stat[0] =3D =
txt1.Text.ToString();</FONT></P>
<P><FONT face=3DArial size=3D2>stat[1] =3D =
txt2.Text.ToString();</FONT></P>
<P><FONT face=3DArial size=3D2>stat[2] =3D =
txt3.Text.ToString();</FONT></P>
<P><FONT face=3DArial size=3D2><STRONG>And added this array to the=20
arraylist:</STRONG></FONT></P><FONT size=3D2>
<P><FONT face=3DArial>stats.Add(</FONT></FONT><FONT face=3DArial><FONT =
color=3D#0000ff=20
size=3D2>new</FONT><FONT size=3D2> stat()); </FONT></FONT></P>
<P><FONT face=3DArial size=3D2>stats.Count tells me that I am adding =
another array=20
to the list whenever I btn_Click</FONT></P><FONT size=3D2>
<P><STRONG>lblResults.Text =3D"The count is: " + stats.Count +=20
"\n";</STRONG></P></FONT>
<P><FONT size=3D2><FONT size=3D3>But I cannot iterate through the =
arraylist to see=20
the results.</FONT></FONT></P><FONT size=3D2><FONT color=3D#0000ff =
size=3D2>
<P><STRONG>for</STRONG></FONT><FONT size=3D2><STRONG>( i=3D0; =
i!=3Dstats.Count;=20
i++)</STRONG></P>
<P><STRONG>{</STRONG></P>
<P></FONT><FONT color=3D#0000ff =
size=3D2><STRONG>string</STRONG></FONT><FONT=20
size=3D2><STRONG> result =3D stats[0].ToString();</STRONG></P>
<P><STRONG>lblResults.Text +=3D result + "\n";</STRONG></P>
<P><STRONG>}</STRONG></P>
<P><FONT face=3DArial>The question, I think, is how do you unbox and =
array from an=20
arraylist? Or is there a better way to do this? :>)</FONT></P>
<P><FONT face=3DArial>Many Thanks,</FONT></P>
<P><FONT face=3DArial>Harry</FONT></P>
<P><FONT face=3DArial></FONT> </P></FONT></FONT>
<P><FONT face=3DArial size=3D2></FONT> </P></DIV></BODY></HTML>
------=_NextPart_000_0006_01C55160.F9C05950--
|
|
|