|
Maybe you need two orclParam variables?
You create it with:
OracleParameter orclParam = new OracleParameter("sHash1", OracleDbType.Char, 100);
But later you assign a new object to it:
orclParam = new OracleParameter("sHash2", OracleDbType.Char, 100);
I would be very surprised if this fixes your problem but it might be worth a try? If it fixes your problem then the Add() function is implemented... in a peculiar way.
|
|
|
|
|
Dear all,
My application works well on Vista, Win 7 32 and 64 bits.
It modifies some registry key in HKEY_LOCAL_MACHINE.
But when run on Win 8 (both 32 and 64), with minimum level UAC (I drag the slider to bottom, then restart), it doesn't work. And there is the error:
"Application attempted to perform an operation not allowed by the security policy. To grant this application the required permission, contact your system administrator, or use the Microsoft .NET Framework Configuration tool. Requested registry access is not allowed."
When I disable completely UAC of win 8 by editing registry, then restart computer, my application works well.
How can I deal with win 8 UAC enable with c#?
Thank you very much.
|
|
|
|
|
If I run regedit on Windows 7 then it runs with elevated priviledges which causes a UAC dialog to pop.
I find it unlikely that your application is doing nothing and yet is allowed total access to the registry on Windows 7. Do you have UAC enabled on your Windows 7 test box? Are you only editing some user data and as such the app might have access? Or perhaps are you installing it on Windows 7 (installing does seem to provide certain priviledges)? Also are you sure that the user for windows 7 and that for 8 both have the same priviledges?
|
|
|
|
|
My application works well on win 7 (32/64) with UAC enabled, it requires to run as Administrator.
But when run this application as Administrator on win 8 (my user is in Administrators group), it gave me the error above. It just runs well when I disable UAC by registry editing.
|
|
|
|
|
You might be trying to modify TrustedInstaller keys. TrustedInstaller is a special user that has power beyond that of Administrator(s). You will need to take ownership of the key in order to work around that (completely ruining the security on your user's machine). If you need to change keys owned by TrustedInstaller you are doing something very very wrong.
If you are not trying to modify TrustedInstaller-owned keys you probably need to indicate which permissions you want when you open the key:
using (var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Foo\\Bar", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
}
using (var key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Foo\\Bar", RegistryKeyPermissionCheck.ReadWriteSubTree))
{
}
He who asks a question is a fool for five minutes. He who does not ask a question remains a fool forever. [Chinese Proverb]
Jonathan C Dickinson (C# Software Engineer)
|
|
|
|
|
I owned this registry key, and I can do what the app should do by hand using regedit.
This is one line of my code, works well under Vista, Win 7, it just has problem with Win 8 UAC enabled.
RegistryKey rk = Registry.ClassesRoot.OpenSubKey(subkey, RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryRights.FullControl);
|
|
|
|
|
I am currently a student in TYBSC(IT) so I had a query that in C# windows form If for example a clientname combobox is there and on selecting the client Name in the combobox the 2 text boxes clientAddress and ClientNumber should be retrieved from the database and get filled in the textboxes.
Sir please help me in my project my mailing me a demo program so that I can Find A Solution to It.
Please Sir and as sson as possible as jan end is ma submission date
trishal
|
|
|
|
|
Try something and if you run into issues, post what you have done here.
Someone might be able to help you.
|
|
|
|
|
Sir can you give me your email id son that i will send my code to you its having some errors can you correct and give me???
|
|
|
|
|
Show your code (just the part with the errors) and the error messages here, and people will try to help you.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
public partial class Form1 : Form
{
string Id = "";
string Address = "";
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.testTableAdapter.Fill(this.database1DataSet1.Test);
}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string SelectedId = Convert.ToString(comboBox1.SelectedValue);
if (Convert.ToString(comboBox1.SelectedValue) != "")
database1DataSet1.DataSource = Database1DataSet1TableAdapters.GetData(int.Parse(SelectedId));
var Id = from r in testTableAdapter.GetData()
where r["Id"].ToString() == SelectedId
select r["Name"];
var Address = from r in testTableAdapter.GetData()
where r["ProductId"].ToString() == SelectedId
select r["Address"];
foreach (var unit in Id)
Id = id.ToString();
foreach (var measure in Name)
ProductMeasure = measure.ToString();
textBox1.Text = Id;
}
|
|
|
|
|
And the question is?
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
u have to bind the two textbox to the same datasoure and the data will apper automatically
all waht u have to do is to put this code to the Load event
private void Form1_Load(object sender, EventArgs e)
{
this.testTableAdapter.Fill(this.database1DataSet1.Test);
comboBox1.DataSource = this.database1DataSet1.Test;
comboBox1.DisplayMember = "Name";
textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.database1DataSet1.Test, "Id", true));
textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.database1DataSet1.Test, "Address", true));
}
|
|
|
|
|
Read this[^] and update your question to the guidelines.
No one will "give" you code, you will need to write it yourself. If you want ready-to-go code, try here[^].
|
|
|
|
|
Hello everyone! I would like to know how I can read metadata of exported types using the Managed Extensibility Framework. I am using Visual Studio 2008 with .Net Framework 3.5.
In .Net Framework 4.0, this can be achieved through type 'Lazy' but this is not available in .Net Framework 3.5.
Since 'ExportMetadata' was provided in the version of MEF provided for .Net Framework 3.5, I do believe there is a way of reading the metadata in the framework 3.5 but I don't know how this is done. Any guidance, please?
|
|
|
|
|
Well I found out that 'Lazy' is available in MEF Preview 9 for .Net Framework 3.5.
I was previously using MEF Preview 5 which did not contain 'Lazy'. Thanks.
|
|
|
|
|
Hello All,
For each solution I have created, I have been adding the installing NLog for each of the solution. It is adds the NLog.config file.
Since I have different solutions, it is always adding the file as Nlog.config.
can I change this name, and give it a name specific to the solution? change the Nlog.config to SolutionA_Nlog.config?
Thank you!
|
|
|
|
|
I havent used NLog before but if you application is executable you can add the NLog Config information to AppConfig.
check this link[^] more details on how to configure NLog Config
Jibesh V P
|
|
|
|
|
vanikanc wrote: can I change this name, and give it a name specific to the solution
I believe so but why would you do that?
Presumably by "solution" you mean deliverable executable. If so each should be installed into their own directory and have their own log file. And so the same name is probably better.
|
|
|
|
|
Awesome! I like the idea of creating each exe having its own directory.
And yes, by solution I did mean executables.
You see we currently have something set up, where everyone copies their executables at the root of the folder. No structure what so ever!!
|
|
|
|
|
vanikanc wrote: where everyone copies their executables at the root of the folder
Certainly not what I would suggest. Makes updating a single deliverable which has shared dependencies impossible.
|
|
|
|
|
Hi,
I have created a .net 4.0 windows form project.
It is on my laptop. In development.
I need to reference a dll from another server into this project.
How can I do that?
Thanks so much!
|
|
|
|
|
seriously!!. it's not a good idea to refer a file from a shared path. your application will fail if you try to deply/run in other PC.
btw what's you real problem? and what is the role of the referring dll??
Jibesh V P
|
|
|
|
|
as per jibesh - it doesnt sound like a good idea .. the most stable ways I can think of are
a) get a copy of the dll for your dev machine - transfer by usb/email/carrier pidgeon
b) map a permanent share to the machine where the dll is and reference the dll on the path
Unless you're back in the good old days of c++ rpc, there's no way to request dll type services over the net (and even then, rpc requires/required a mapping and comms layer to do so)
'g'
|
|
|
|
|
When you add a reference over the network, the IDE will make a local copy of this dll anyway.
So, nothing should be stopping you from copying the dll to your own machine / project folder and referencing it from this local location.
|
|
|
|