|
I'm no expert in Oracle, but my first guess would be to remove the colons you put in the parameter names.
cmd.CommandText = "SELECT * FROM USERS WHERE USER_ID = pUserId"
cmd.Parameters.Add( new OracleParameter( "pUserId", OracleType.VarChar )).Value = "[USER_ID]" )
Putting "special" characters in an identifier is just not a good idea in any language.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
Hi@all,
I would like to create a Vu-meter application in C# to display for any sound that goes to the sound card ,but I don't know how
Can anyone help me on how to capture the sound and make the app. work ?
code?
Thanx.
|
|
|
|
|
I'm relatively new to C#.
I need to find a way to convert a section of a byte[] to an double or convert to an int if required.
In C++ I would use the algorythms below but I don't know how to express this in a form that c# is happy with.
for an int
BYTE dBytes[4];
int ret = *(int*) dBytes;
for a double
BYTE dBytes[8];
int ret = *(int*) dBytes;
|
|
|
|
|
Check out System.BitConverter.
|
|
|
|
|
Brilliant, Thats exactly what I was looking for.
|
|
|
|
|
hi,
i want to do some device related application using C#(say for eg. TAPI).
Any article or books for this ???
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
You're going to have to be alot more specific about what your trying to do.
Define "device related" and what device?
C# and VB.NET are too high level for efficient device driver work...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
|
The best resource on TAPI and C# is here on GotDotNet[^]
IMO. TAPI and C# aren't a good mix. It just adds an extra layer of complexity. Unless you are well versed with TAPI, I'd say clear of trying to use it through C#.
Michael
CP Blog [^]
|
|
|
|
|
Is it possible to set the location of a main form within the screen to the same position every time the app is started?
The propertie Form.StartPosition seems to make little difference.
I read/write the forms size from the registry, but without controling it's start position it's only half a job.
|
|
|
|
|
Make sure you set the Form.StartPosition equal to FormStartPosition.Manual , then you can specify the Top and Left positions. Persist this value where ever you like (database, XML, config) and set properly at runtime.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Thanks for the quick reply.
I found the Control.Bounds property and set this in the load event. Seems to work just fine.
|
|
|
|
|
Hello everybody!
My problem is to get/set individual array items which are instanced via reflection.
To give you an overwiew here´s some code:
***************************************************
System.Reflection.Assembly assembly;
assembly = System.Reflection.Assembly.LoadFrom(dllfilename);
foreach(Type assemblyType in assembly.GetTypes())
{
if (assemblyType.IsClass)
objInstance = Activator.CreateInstance(viptype);
foreach(FieldInfo f in objInstance.GetFields(BindingFlags.Public | BindingFlags.Instance))
{
if (f.FieldType.IsArray)
{
// read every array value!
// f.GetValue(objInstance) returns only a complete value (and I don´t know how to handle this)
// How can I access to every array item itself???
}
else
{
// do something different. This is working fine!
}
}
}
*************************************************
And the source from the assembly looks something like that (extremely shortened, but same structure):
************************
public class myClass
{
public int ID;
// Test
public int Test;
// Array
public int array[15];
}
************************
How can I get in the source at the top for example the 10th integer of the array?
Please help me
Norman-Timo
|
|
|
|
|
Norman-Timo wrote:
How can I get in the source at the top for example the 10th integer of the array?
It is reflecting against what was just loaded into memory, there will be no value in the 10th position of the array.
- Nick Parker My Blog | My Articles
|
|
|
|
|
|
Hi,
I have an app which consists of a Main Window and 10 or so client windows. However, I need the app to work like an SDI in that only one window is visible at a time and that window should be maximized.
If I set all my child windows to have WindowState.Maximized this kind of works, but after switching windows 4 or 5 times, I end up with all the windows showing but not maximized.
I have tried various things including overriding OnActivated, OnResizing, OnSizeChanged and changing the windowstate and window size but none seem to work.
Where should I be looking? Is this controlled by the child forms or the MDI Parent?
Thanks for any help
Cheers
James
|
|
|
|
|
My client had a app running in his system. I have to know the
physical path of the file.
|
|
|
|
|
Do you only know the file name itself, no path information is known at all? You could write a simple recursive method to find all files from the root. More information would be helpful.
- Nick Parker My Blog | My Articles
|
|
|
|
|
Application.ExecutablePath is what you looking for?
"Creating tomorrow's legacy systems today.....
.... One CRISIS at a time!" -- Unknown
"If you build it....
.....BUGS will come!" -JB
this.Dispose();
"A Bug is a piece of <sup> code </sup> that knows whatz its purpose"
|
|
|
|
|
Hi,
Iam looking for any code/sample for implementing trace in
.NET remoting so that the client and server log information to the one location.
Any help will be greatly appreciated.
Thanks in advance
saleem
|
|
|
|
|
Assuming the remoting client and server have access to the same resources for logging isn't a safe assumption. Instead, write a logging interface into the server, one that the server can use locally and one that the client can make remote calls to. The backend could be anything you like: database, log text file, XML, whatever (using a provider pattern to provide the backend would be a good idea to be able to switch the backend provider easily).
Search CodeProject for other ideas.
If you want automated tracing of all messages sent back and forth, see the ProxyAttribute class documentation in the .NET Framework SDK. This includes an example of how to use this. While this would only work on the client, all messages to and from both the client and server would pass through your RealProxy -derivative and you could log those to a source (either a source local to the client, or again make remote calls on the server - just be sure not to log those logging calls or else you'll wind up in an infinite loop or messaging).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
hi there,
I have a panel control which contain more than 10 label controls. these label controls are added dynamically by user.
In this application user can slit a control into not less than 10 different shares.And adding it to panel control list.
(don't worry about this. If a user select a control to split into 5 or 10. i am simply creating 5 or 10 controls which have the size 5/10 or 10/10 of the control which took to split.)
My question is something different. After spliting if i click on that different split then it will maintaine their state and will be there on panel . Otherwise say if i am doing someother work just after spliting the control it will vanish from that panel.
Do you have any idea ?
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Define what you mean by "split".
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
i use winxp,& i'd like to craet a program in c# to send e-mail to hotmail...
please help me.
if someone want to help me he should know that i don't know anything about sending e-mails.
thanx alot.
|
|
|
|