|
Error: ORA 6413
Text: Connection not open.
------------------------------------------------------------
Cause: Unable to establish connection.
Action: Use diagnostic procedures to ascertain exact problem.
Solution Description
--------------------
You are starting the application from a directory with a special
character in the name.
A simple testcase:
create a directory c:test(4)
copy odbctst.exe to this directory and start it from this directory
you will get the ora-6413 when trying to connect to an oracle database
The error is caused by the paranthesis in the directory name.
Remove the special characters from the directory name and everything
will work as designed.
Thanks to MSDN Forums
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
hi
the code below throws this exception
"ExecuteReader requires the command to have a transaction when the connection assigned to the command is in a pending local transaction. The Transaction property of the command has not been initialized."
on the update statement in the try catch block. Please help.
DatabaseDataSet.PersonnalInfoDataTable ds = new DatabaseDataSet.PersonnalInfoDataTable();
DatabaseDataSetTableAdapters.PersonnalInfoTableAdapter adapter = new Testing.DatabaseDataSetTableAdapters.PersonnalInfoTableAdapter();
adapter.Fill(ds);
DatabaseDataSet.PersonnalInfoRow newrow = ds.NewPersonnalInfoRow();
newrow["firstname"] = this.textBoxFirstName.Text;
newrow["lastname"] = this.textBoxLastName.Text;
newrow["telephone"] = this.textBoxTelephone.Text;
ds.AddPersonnalInfoRow(newrow);
adapter.Connection.Open();
SqlTransaction myTrans= adapter.Connection.BeginTransaction();
try
{
adapter.Update(ds);
myTrans.Commit();
ds.AcceptChanges();
}
catch(Exception l)
{
myTrans.Rollback();
ds.RejectChanges();
}
adapter.Connection.Close();
Nana
|
|
|
|
|
I have torn the Web apart looking for a solution. The only thing I have found that makes any sense, doesn't work for me. I want to hit the Enter key, read the previous line (the line the cursor just left) and determine how many spaces and/or tabs are before the first character. Then, place the cursor at the same position on the current/new line by adding the correct number of spaces and/or tabs before it including the tabs and/or spaces that may or may not already be there. I know there are controls/classes for sale out there that offer all the cool stuff for smart indenting and syntax highlighting, but I'm not a wealthy man.
private void richTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
e.Handled = true;
int pos = richTextBox1.SelectionStart;
int lineNumber = richTextBox1.GetLineFromCharIndex(pos);
String currentLineStr = richTextBox1.Lines[lineNumber];
int firstChar = 0;
while (firstChar != currentLineStr.Length)
{
if (!Char.IsWhiteSpace(currentLineStr[firstChar])) break;
firstChar++;
}
String indent = currentLineStr.Substring(0, firstChar);
richTextBox1.SelectedText = indent;
}
}
Thanks in advanced for any help...
(I may be asking about syntax highlighting after I get this part worked out, if I can't figure it out.)
|
|
|
|
|
Try:
int lineNumber = richTextBox1.GetLineFromCharIndex(pos-1) ;
richTextBox1.Lines[] is a zero index array, but in your example if I press enter on the first line GetLineFromCharIndex returns 1 not 0, so you loop was reading data from the wrong line. According to the documetation GetLineFromCharIndex returns on a zero index as well, so I knew that wasn't the problem. My next thought was that the enter key had been processed, but that didn't make sense because the code is in the keypress event handler.
Here is what I finally figured out... You are getting the selection index which is at the end of the line. This puts it one past the last character. Because of this GetLineFromCharIndex seems to consider it on the next line. So if you do GetLineFromCharIndex(pos-1) which gets the character before that, then everything works out.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
Judging from your concise and confident reply, I have to assume you tested your suggestion. That being said, if it's still not working for me after I made your suggested modifications, what am I doing wrong? Could the TextChanged event be interfering? Thank you for your help.
private void RichTextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)Keys.Enter)
{
e.Handled = true;
int pos = RichTextBox1.SelectionStart;
int lineNumber = RichTextBox1.GetLineFromCharIndex(pos - 1);
String currentLineStr = RichTextBox1.Lines[lineNumber];
int firstChar = 0;
while (firstChar != currentLineStr.Length)
{
if (!Char.IsWhiteSpace(currentLineStr[firstChar])) break;
firstChar++;
}
String indent = currentLineStr.Substring(0, firstChar);
RichTextBox1.SelectedText = indent;
}
}
-- modified at 1:23 Saturday 26th May, 2007
|
|
|
|
|
First, how is it not working?
Second, I would suggest that you put break points in the keypress event, change event and any other relevant code. Watch it execute line by line... which is what I did. If necessary comment out the change event code and any other relevant code and execute without it. I copied your code above and tried it again and it still works, so something else is going on.
topcoderjax - Remember, Google is your friend.
|
|
|
|
|
I placed the code into a new project with nothing but the form and the richTextBox. It still didn't work. There are no errors, however, when I run the app nothing happens when I hit Enter -- I.E. no spaces and/or tabs are added before the cursor on the next line. Is there another way to do this?
|
|
|
|
|
I enabled tabs ont the control. Ran the app and tabbed over once and typed text. Pressing enter took me to a new line and inserted the tab. Pressing enter in the middle of my text moved the remaining text after my position to the next line with tabs. I'm in 1.1 framework, don't know if it matters. Did not try pressing enter without any text or pressing enter at the very beginning of a line. Will look at the project again tonight when I get the chance and see if anything else comes to mind and if not may post the project code.
|
|
|
|
|
I'm using Vista Home Premium, Visual Studio 2005 and .Net 3.0.
|
|
|
|
|
Ok I tried it in 2.0 XP. Code still worked. Best of luck.
|
|
|
|
|
One for the "duh" files.
I figured out why it wasn't working for me.
I hadn't added the KeyPress event to my richTexBox control.
Thanks for your patience and help.
|
|
|
|
|
No worries... happens to everyone from time to time. Glad I could help.
|
|
|
|
|
does it send the error-log to company?
if it is.
what method to send error log?
where will be stored it for clerks look over when company has received error
log?
I need know it, please give me directions.
Thanks.
|
|
|
|
|
I would suggest sending an error report via an email. You don't really have to prompt the user to fill out an email, you can fill it out yourself by using the System.Net.Mail namespace.
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
I am having doubt in c# i have an database with one table
contains two fields no(primary key) and name.
so now when i enter no in the text in interface.
i have to check wether the given value is in already exist
please send detail in c#...
hai all please clarify mny doubts
|
|
|
|
|
And why do you hate using primary key, when primary key is the key to your problem
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
I think that he actually has a primary key, named "no".
---
single minded; short sighted; long gone;
|
|
|
|
|
dhulipudi wrote: I am having doubt in c#
Why do so many write "doubt" when they mean "question"?
dhulipudi wrote: i have to check wether the given value is in already exist
Make a query that counts how many records there are with that number. Example:
"select count(*) from SomeTable where no = 42"
The result is either zero or one, which tells you if the record exists or not.
---
single minded; short sighted; long gone;
|
|
|
|
|
when i enter any number in text box have to show message wether the given value is intext box are not...have to check the textbox value with database value...
hai all please clarify mny doubts
|
|
|
|
|
Use Guffa's query he provided you. Just substitute the 42 with the value in the textbox...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I have a file (myFile.txt)in every subfolder:
MainFolder
<subfolder1>
<sunfolder2>
<subfolder3>
I want to search every subfoler an delete the file myFile.txt
any help is greatly appreciated
using VS2003
|
|
|
|
|
Check out these methods:
File.FileExists
File.Delete
Trinity: Neo... nobody has ever done this before.
Neo: That's why it's going to work.
|
|
|
|
|
Hello!
i added items in combobox from treeview.
but i have a problem in combox because; when i enter 2 or more times same text in treeview nodes,combobox is adding 2 or more times these texts, too. i want that, texts return only one time. how can i do?
thanks
|
|
|
|
|
Hi,
I developed an application that receives a lot of transactions and generates C# code to perform a dynamic execution in order to create the requested response. The C# code is generated matching the request data with several rules define by the users.
I used some profiler to find a memory leak that were happening with the app. Generating some snapshots I found memory problems with reflection.
When I executable performed the CodeDomProvider.CompileAssemblyFromSource the memory seems to be very afected, It seems that any assembly loaded into a given cannot be unloaded once it's been loaded with .NET runtime.
This kind of programming could work for few transaction per hour, but when it refers to several transaction per seconds this will be a real problem.
Is there someway to dynamically execute C# code and preserve a lightweight execution and good performance?
I was considering developed a parse/compiler because the complexity that could achive the generated source code, but First of all, I want to find out if there is something in C# that already do that?
Generated Code sample: The values of the variables are filled with the incoming transaction data.
" int x = 13, y = 3, z = 200; if ( ((x*y) > z) && (z < 200) && ( x > y) ) return 1;"
Thanks.
rmga
|
|
|
|
|
rmga wrote: It seems that any assembly loaded into a given cannot be unloaded once it's been loaded with .NET runtime
While an assembly cannot be unloaded once it is loaded into an application domain, you can create a new application domain, load the assembly into it and the unload the entire domain. I do not know the performance of this only that it can be done.
-- modified at 23:26 Friday 25th May, 2007
topcoderjax - Remember, Google is your friend.
|
|
|
|