|
OleDbCommand OCM = new OleDbCommand("SELECT DOCUMENT_NAME ,USER FROM [" + WorkSheetName + "]", cn);
i am using the above way because i only want thse two coloumns form my excel and import them to a dbs table but i still am getting an arror..please help
error "No value given for one or more required parameters."
|
|
|
|
|
Did you name the columns in the spreadsheet? By default, the values in the first row are treated as column names.
|
|
|
|
|
yes my spreadsheet coloumns are the ones in this line of code
OleDbCommand OCM = new OleDbCommand("SELECT [DOCUMENT_NAME] ,[USER] FROM [" + WorkSheetName + "]", cn);
OleDbDataReader odr = OCM.ExecuteReader();
when i build my app it can not go tru this statement gives me this error
"No value given for one or more required parameters." because what i am trying to do is get documentname and user name from excell then store it in a table but now i can get these ..
Hope i did answer you question
|
|
|
|
|
Ensure that the WorkSheetName variable ends with a dollar ($) symbol.
|
|
|
|
|
Hi all
I'm having trouble with my app and i need some help.
I have an app that needs to paste some numbers from a listbox into another App.
Using
SendKeys.Send("^v");
works great while working on a local computer, the problem is that i'm working on a remote desktop and sometimes when sending the "^v" it only sends the "v"
Can anyone help me figure this out ?
Thanks in advance.
|
|
|
|
|
|
I don't think that's the problem , because it works without the {} , but for example when i have 50 numbers in the listbox, pasting 45-47 number is OK, while it makes 3-5 random mistakes, sending only the "v".
To emulate "Control" you don't need {} because than it will send the "^" character only...
|
|
|
|
|
|
Those a control characters to SendKeys. If you want to send those actual characters, you have to enclose them in the curly braces.
He's sending Control-V, which is correct in his code.
The technique, on the other hand, of using SendKeys at all is suspect.
|
|
|
|
|
I agree. Basically, using SendKeys is per definition unreliable. Best to code what you want (and keep control), rather than relying on a quirky method that can go wrong at any turn.
|
|
|
|
|
Try running remote desktop in full screen mode.
Apparentely, Remote Desktop only acknowledges key strokes in full screen mode.
Too much of heaven can bring you underground
Heaven can always turn around
Too much of heaven, our life is all hell bound
Heaven, the kill that makes no sound
|
|
|
|
|
Try sending an additional printable character afterwards, e.g. a space: "^v ". Some time ago, I experienced a situation where that helped, but I do not know why that worked...
|
|
|
|
|
What's involved in converting a hierarchy of classes to an XML file? I'm not talking about serialization. I just want to take a collection of objects and create an XML file out of it?
Thanks
Everything makes sense in someone's mind
|
|
|
|
|
Kevin Marois wrote: I just want to take a collection of objects and create an XML file out of it?
Actually, that is serialisation, to XML at least. The path of least resistance is to use the built in XML serialisation.
If you don't want to do this you nned to use reflection to traverse the object graph whilst writing the XML to file.This is slightly harder than it sounds,as you also need to take into account collections and potential loops in the graph.
Personally, I'd go for the built-in option if possible. You can write your own formatter if the built in one isn't to requirements.
|
|
|
|
|
Here's one way.[^]
(Whoops, pasted the wrong link. )
modified on Monday, July 11, 2011 10:40 PM
|
|
|
|
|
Kevin Marois wrote: I'm not talking about serialization
Yes, you are. Cue the wiki quote
serialization is the process of converting a data structure or object into a format that can be stored (for example, in a file... .
Start with the docs for XmlSerializer here: http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx[^]. There are plenty of examples on that page of the default, as well as finely controlled serialization.
|
|
|
|
|
I'd like to write an application that monitors connections to my machine through the sessions portion of computer management. I have win7 32 bit and .net 3.5 .
Can anyone point me in the right direction on which c# methods I should be looking at?
Thanks!
|
|
|
|
|
You will have to look up the API for 'the sessions portion of computer management' (not sure what that is myself but hopefully you do!), and call the appropriate methods through P/Invoke.
|
|
|
|
|
|
Hi Ken,
Thanks for the response.
I was able to get this working today, the only problem is that I cannot close the session. It appears that this is a Windows thing, because I see the same behavior when I do so within computer management. I can right click and say "Close session" and then refresh and it will reappear.
I was wondering if you had any ideas on how to actually close the session?
In my code, I am calling session.Delete(); without any success.
Thank you
|
|
|
|
|
The blizzard authentication is really cool, just as well as all other RSA tokens. I understand that synchronization plays an important role in this matter, but when using RSA or authenticated encryption, isn't its main goal based on time of the day that this information is generated? If so, if the server goes down, doesn't that mess up the synchronization with all other devices?
|
|
|
|
|
My understanding is that the Blizzard authenticator is purely a number generating machine.
It does not depend on the time - if you ever use an RSA token you will find that each time a new number shows a bar also decreases in size.
With an RSA token you need to enter the number generally while there are still two bars left due to this synchronization issue.
The Blizzard authenticator has no such countdown bar.
I think this question may also need to go to the lounge as it is not really a C# question
Continuous effort - not strength or intelligence - is the key to unlocking our potential.(Winston Churchill)
modified on Tuesday, July 12, 2011 3:03 AM
|
|
|
|
|
Hi,
How I can turn on and off write protection in my dvd rw drive
programmatically. this is possible through c# or not.
Thanks for any suggestion...........
|
|
|
|
|
|
hello Monica,
i didn't find solution using WMI......
if you suggest me any WMI class dan i'll try again..
thank u
|
|
|
|