|
Because you didn't set the type for parm1 , most likely. You need to assign the values using the appropriate type, which means you need to convert lbCartisNum.Text to an integer value.
It's hard to tell, though. It does work, though: thousands of people use it every day. You didn't post the exception being thrown, so how can I know exactly what's wrong? You need to be more specific about your problems, like posting the exception message and type (like System.Data.OleDb.OleDbException and that it returned "couldn't cast to the appropriate type", or something like that).
The following may work - but again this is without knowing what your actually problem is since you didn't tell me:
cmd.Parameters.Add("@TeorBohen", OleDbType.VarChar, 80).Value = RbTeorBohen.Text;
cmd.Parameters.Add("@CartisNum", OleDbType.Integer).Value = int.Parse(lbCartisNum.Text); Since you assigned text to parm1.Value then the value would've been quoted in the resultant command before being executed, meaning that it wasn't representing a number but instead a string containing the number.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
i all send u the file on Mail...
|
|
|
|
|
What good would that do? I don't have your database, nor do I want it over email.
Read the documentation for the OleDbCommand.Parameters property and the OleDbParameter class for information and examples. So long as your SQL expression is right in terms of what your database is expecting, what I told you and what the documentation covers solves your problem.
If you're getting an exception that seems to indicate something else, then reply with the exception type and message - the same thing I tell everyone when they simply say something like "it doesn't work". The other regular responders would do the same. How could we know the problem unless it's painfully obvious? You need to tell us the exact error or helping you is difficult.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I have some code to take a screenshot of a window, it takes it's handle as a parameter. How can I make my code take a screenshot of a hidden, or covered window? Is it even possible?
/\ |_ E X E GG
|
|
|
|
|
When get down to it, a window can never be hidden (this isn't necessarily true with layered windows, however) - it's simply not drawn. The window manager doesn't draw portions of windows - or windows in their entirety - if they are obscured. So - to answer your question - it is not possible to take screenshots of hidden windows because they're simply not painted. The screenshot code is, after all, asking GDI or GDI+ to paint into a compatible DC for a bitmap instead of a screen, printer, or other display device.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Ok, then. Um, is there any way to get the image of a non-visable window???
/\ |_ E X E GG
|
|
|
|
|
I think you missed my point: hidden windows are not drawn to any device context (DC), which means you can't get an "image" of them - they're not drawn.
If you want a simple one-word answer to your original question, then "no".
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hello
i want to generate the random number for the bignumber by using the bignumbers class. how to do it?
|
|
|
|
|
Read the article for the BigInteger class I gave you earlier. The guy created it specifically for RNGs for encryption. If you have questions about the article the the BigInteger class itself, ask in the message board at the bottom of the article - that's what it's there for. This forum is for general C# questions and questions about .NET development with C# that are covered under other forums (like the ASP.NET or ADO.NET forums), don't include article content, and aren't third-party controls (like you asked about in your previous question regarding Dundas).
BTW, you should know Dundas is a major supporter of this site. You shouldn't be announcing that you're trying to crack their product.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
This is a third-party control and is not supported by this forum, nor should it be since removing the Watermark in an evaluation version is wrong and most likely illegal (based on whatever the EULA that you agreed to says).
If you need help with third-party controls or applications you should consult the manufacturer/developer.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
hello
I am really very sorry for asking such a non-professional question. I dont want to ask it in this manner as i only required a control which i can use freely. I am again very sorry.
regards
asmyan
|
|
|
|
|
It's an evaluation version, as you clearly stated. That implies it is not free, and I think you knew that, too, since you were trying to crack it and get rid of the watermark.
If you want to know how to make your own charting control, then search or browse the articles on this site. I've seen several that cover the basics of charting (with a decent amount of math know-how and knowledge about owner drawing controls, it's actually quite easy).
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
|
Hi,
I created a simple application in C# using .NET visual studio. The release build seems to work just fine on my development machine but it does NOT seem to work on my "non-development" machine (a clean W2k machine with no visual studio .net). By the way, I was using the default release build setting to create the exe.
I get error complains such as "mscoree.dll is missing". When I provide this mscoree.dll it cries about some registry key not setup to point to the install path etc. etc.
Any idea, suggestion, help?
Thanks!
|
|
|
|
|
|
And poeple think that only VBers ask the dumb questions...
Seriously though... I can't count the number of times this gets asked all over the place...
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Jörgen Sigvardsson wrote:
If the physicists find a universal theory describing the laws of universe, I'm sure the a**hole constant will be an integral part of that theory.
|
|
|
|
|
They should rename the DLL from "mscoree.dll" to something like "Please install the .NET Framework Redirstributable.dll" so error messages like "mscoree.dll is missing" sound more understandable to the users
--
Affordable Windows-based CMS: www.zeta-producer.com
|
|
|
|
|
|
I'm a beginer in WebServices. I need to interact my WebService with
a DataBase and the clients of the WebService. Because I'm the
administrator of DB I need to send to WebClients, of the WebService,
updated information on tables, datasets ... For this i need to known
from my WebService Witch clients are connected at some time.
How can i update clients information without they hask for none?
thank's.
Bruno Conde.
|
|
|
|
|
There are many articles covering web services, here on CP and on MSDN. Check out the articles posted here[^] on web services written in C#.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Actually, that's not even possible. XML Web Services are invoked over HTTP, which is - by nature (and it's very protocol) - client request / server response driven. A server cannot contact a client; only a client can make requests on the server, in which case the server (should) respond.
If you need a "net send" equivalent take a look at the .NET Remoting Overview[^]. You'll want to use a channel that is not HTTP-based, like the TcpChannel . The clients will still need to connect to the server (like a chat application), but they can stay connected and the .remoted object (on the remoting server) can send the connected clients data or even invoke requests on the client, instead of only the clients being able to invoke methods on the server.
The .NET Framework 1.x provides the HttpChannel and TcpChannel , and 2.0 will add an IpcChannel . Channels - like formatters - are extensible. Here on CodeProject someone even posted a channel using MSMQ (Microsoft Message Queue) server. Nifty.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hello All,
I want to send fax from a c#.Net form using rightfax.dll(version 8.5.0.103), can anyone pls provide me a insight of this by providing a piece of code or any article for the same.
your advice would be highly appreciated.
This is very urgent.
Regards
Pavan
|
|
|
|
|
RighFax is a third-party library/application and you need to read any developer documentation they have, like at http://www.captaris.com/customer_support/tech_docs/5609.html[^]. This forum is not about supporting third-party libraries, but questions specific to C#.
Your question is how to interop with it. For that, you can read about in Consuming Unmanaged DLL Functions[^] and Marshaling Data with Platform Invoke[^] in the .NET Framework SDK. If you have questions beyond what you should read you could ask here.
As far as what native APIs to P/Invoke, and what data structurs, constants, and interfaces to declare in C# is beyond the scope of this forum. You would only be able to determine that information by reading the developer documentation for RightFax or finding a developer community specific for RightFax, if such a community exists.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
http://www.captaris.com/customer_support/tech_docs/5609.html
The above link is not working.Can some one post a sample code to send a fax using RightFax.
Thanks.
Kotte
|
|
|
|
|
I want to develop a web server. When a user says from the browser http://localhost:8080 server must return a web page with text box and browser button and upload button. User can select the file and can click the button Upload. Let us say webserver.exe is present in c:\. When user clicks upload button this must be handled by the webserver and should upload the file to the same drive where the web server is running. I mean in C:\. In this case a POST method has to be handled. I am unable to handle the post method in my scenario. This will be regarding Content-Length,content-type processing.
Can any one help me in this regard by specifying sample code. I am already running out of submission date.
|
|
|
|