|
hi
i want to know what is the Diffrence between the DATASET and the DATAREADER
and when you use each of them
thankx
|
|
|
|
|
datareader is a connected resultset, while the dataset is disconnected.
Have a look on MSDN for more detailed info though.
Cheers,
Simon
sig :: "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
article :: animation mechanics in SVG blog:: brokenkeyboards "Most of us are programmers, but a few use VB", Christian Graus
|
|
|
|
|
Hi all,
i am developing a software ,,which will helpfull for the network administrator in such a way that....it will provide efficiency to the printer..
my software is explained as
this software will restrict the user to use the printer....for example...
the network administrator will provide a database for the user that e.g, "abc" user can only print 3 pages...if user send 4 number of prints from any place means from network or any software then then the message box come to the user that u r restricted to use on 3 pages...the boundries of such software are completed.....the main module that when the user send the print job to printer then the job should cancelled and read the database and according to that data base there will be printing pages to certain users...
So i have to take help that ....plz made me this help that
this module i m tying a lot ..but not happening that the job should canelled first of the printer and then job according to database apply...please programmes help me .I will very thankful to all...I will wait for yours response and the code also related to this module..
Lot of thanx for solving my problem
|
|
|
|
|
cishi_us wrote:
I will wait for yours response and the code also related to this module..
Lot of thanx for solving my problem
Uhhh.... YOU have to write the code, we're not doing it for you. You solve your own problems, we just help.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
well sir sure i like to take urs help...i have just reaced to my destiny as well but some problems occuring in it.....
i m writing here u code and plz try to help me...The problem occuring on following places..please read code i m writing where the problem is occuring..
///////////////////////////////////////////////////////////////////
try
{
PropertyDataCollection __gc *pdc = e->NewEvent->get_Properties();
PropertyDataCollection::PropertyDataEnumerator __gc *pdce = pdc->GetEnumerator();
while(pdce->MoveNext())
{
PropertyData __gc *pd = pdce->get_Current();
ManagementBaseObject __gc *mbo = dynamic_cast<managementbaseobject *="">(pd->get_Value());
1) problem***************problem occuring on the below if statement.not all time but some time the mbo variable does not declare and by using watches i see that mbo is undeclared value.its some time ... and printer does not pause..***********************************
if( mbo != NULL && mbo->ClassPath->ToString()->ToUpper()->EndsWith(S"WIN32_PRINTJOB") )
{
/////
//pause job
long a=0;
long *hprinter = &a;
for(int i=0 ; i<this->printersname->Length ; i++)
{
try
{
int result = PrinterAPIs::OpenPrinter(this->printersname[i], hprinter, NULL);
bool resultf = PrinterAPIs::SetJob(*hprinter, (long)Int64::Parse( mbo->Properties->get_Item(S"Jobid")->Value->ToString() ), 0, NULL, 1);
PrinterAPIs::ClosePrinter(*hprinter);
MessageBox::Show(this, mbo->Properties->get_Item(S"Owner")->Value->ToString());
*****************************************************************************
2) Below message box is not showing the correct number of pages that comes from print status that come in task bar when a pages are going to print.***************************************
MessageBox::Show(this, mbo->Properties->get_Item(S"TotalPages")->Value->ToString());
if(resultf == true)
break;
}
catch(Exception __gc *ex)
{
MessageBox::Show(this, ex->ToString());
ex = NULL;
}
|
|
|
|
|
You do realize this is the C# forum, right? Visual C++ is over here[^]!!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello,
I'm absolutely new to programming, so please don't be too hard on me...
I'm trying to make a simple form application to hide or show hidden files. When I try to run the application I get a "System.NullReferenceException: Object reference not set to an instance of an object."
I found many topics related to this problem, but I still cannot figure it out.
Here's the code:
partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void HideFiles()
{
RegistryKey MyKey = Registry.CurrentUser;
MyKey = MyKey.OpenSubKey(".Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", true);
MyKey.SetValue("Hidden",2);
MyKey.Close();
}
private void ShowFiles()
{
RegistryKey MyKey;
MyKey = Registry.CurrentUser;
MyKey = MyKey.OpenSubKey(".Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced", true);
MyKey.SetValue("Hidden",1);
MyKey.Close();
}
private void ShowButton_Click(object sender, EventArgs e)
{
ShowFiles();
}
private void HideButton_Click(object sender, EventArgs e)
{
HideFiles();
}
}
|
|
|
|
|
NullReferenceException is a very basic exception you get when you declare an object reference but do not assign a value to it (or, in your case, have a method returning null and assigning this null to your reference) and then try to access the non-existing object.
Just debug the code then you'll see where the exception occurrs.
I assume the subkey you're trying to open doesn't exist (it should start with "Software", not ".Software").
mav
|
|
|
|
|
mav.northwind wrote:
I assume the subkey you're trying to open doesn't exist (it should start with "Software", not ".Software").
Thank you, thank you!!!
The 'dot' did it! Pfff, if I knew that it was that simple...
I presume that once you get a little more experienced, you don't make any more mistakes like that. (I hope...)
Thanks again...
Markali
|
|
|
|
|
Though I am not much more experienced than you ,I may say, once you started to face with errors , you learn how to deal with them , esp. using debugger (watch is a great tool btw..), understand and comment on errors, than find the appropriate solution..
|
|
|
|
|
I am writing an application that allows user login by windows authentication (includes domain and username).
For example:
Username: MYDOMAIN\MyUser
Domain:MYDOMAIN
If this username is valid, application will check for user's role, if user's role is BUILTIN\Users then this user can do their works.
|
|
|
|
|
It's nice that you are writing an application, but what's your question?
mav
|
|
|
|
|
And?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
oops... I am trying to write this application, but I don't know how to write. Sorry,
|
|
|
|
|
Right, thats nice, so what's your specific question?
|
|
|
|
|
the code is from my work:
class Test
{
static void Main()
{
int a = 0x79de61c0; //2044617152;
a += 0x12345678;
//a 应为 0x8c12b838; //-1944930248
if( a< 0 ) a = -a;
//string str1 = a.ToString();
System.Console.WriteLine( a );
//string str2 = a.ToString();
}
}
Here: if( a<0 ) a=-a; means a will be positive(>0)
if we use line "str1" or "str2", we get a negative number:
-1944930248。
Why a.ToString() effects the result?
|
|
|
|
|
I'm not getting a positive number at all, a.ToString() doesn't effect the result.
I think you should be using long instead of int , otherwise you'll be getting overflows all the time and unexpected results if you rely on the sign of your values.
You can use the checked keyword or the /checked compiler flag to detect such overflows.
mav
|
|
|
|
|
dstang2000 wrote:
if( a< 0 ) a = -a;
And if you want the absolute value, try Math.Abs .
-- LuisR
Luis Alonso Ramos
Intelectix - Chihuahua, Mexico
Not much here: My CP Blog!
|
|
|
|
|
When I debug, I found it is a terrible bug in JIT.
btw: JIT instruction is correct.
I've asked somebody to report the bug to MS.
|
|
|
|
|
Hi Guys,
I missed a lecture yesterday and my lecturer was starting a new topic on logically linked arrays.Can you please explain this topic briefly to me with an example using a logically linked array.This will assist me the next time i go to class coz i wont be behind.
uni1985
|
|
|
|
|
That's a flame bait if ever I saw one
Why don't you ask one of your mates who attended the lecture to explain it to you?
You weren't there and neither were we, so how come you think we can tell you what your professor taught?
Let's reverse the situation: You find out what your professor wants you to know about logically linked arrays and then write an article here so that everybody can learn a valuable lesson.
mav
|
|
|
|
|
lindiwe wrote:
This will assist me the next time i go to class coz i wont be behind.
Yes, you will be!
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have a label that when it is clicked, a text appear. How do I make it toggle?
Click once appear, click again disappear?
thanX for any suggestions
|
|
|
|
|
You can use a boolean.
boolean isShow;
if(isShow)
{
showText
isShow=false
}
else
{
don`t show text
isShow=true
}
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|