|
N a v a n e e t h wrote: What you have done is BAD.
I knew this, it looks bad and did not work.
Slowly I am learning now as for style that will come in time.
N a v a n e e t h wrote: If you are sure that you will always have a wellformed input, you could easily do this with regular expressions
Where can I learn about regular expressions?
Thank You
Frazzle the name say's it all
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods
|
|
|
|
|
frazzle-me wrote: Where can I learn about regular expressions? Lots of places, Google would be a good start.
|
|
|
|
|
dear all
i saw this article
http://www.codeproject.com/Articles/6554/How-to-use-HttpWebRequest-and-HttpWebResponse-in-N?fid=36698&select=4203280&tid=4436732
somebody can explain for me how i can use this class in my project
regards
arash
|
|
|
|
|
The article already explains that. What more do you need?
|
|
|
|
|
Not without knowing more about your project.
|
|
|
|
|
Hi,
I am using below codes to bind data to a list box. But I got this error.
DataTable tbl= new DataTable();
OleDbDataAdapter da = new OleDbDataAdapter("select * from myTable", mycon);
if (da == null)
return;
da.Fill(tbl);
myListBox.DataSource = tbl.DefaultView ;
myListBox.DisplayMember = "CustomerName";
myListBox.ValueMember = "CustomerCode";
Are there anyone can help ?
Thanks and regards,
|
|
|
|
|
You forgot to include the error-message in your post. I assume you did set a connectionstring and the likes?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
The error-message is same as the topic: No value given for one or more required parameters
Kind regards,
|
|
|
|
|
Ah. Can you post it, including the stack-trace?
Try setting the datasource after setting the displaysource and valuemember.
Can you also show us the code where the connection is created?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy,
I tried to set the datasouce after setting the displaysource and valuememember. Then, I only got the error at the line setting datasource.
This is the connection string: Provider=Microsoft.Jet.OLEDB.4.0;Data Source=./data/system.mdb.
And after the line: da.Fill(tbl);
the DataTable variable tbl still has data
|
|
|
|
|
CustomerName and CustomerCode are columns should be valid columns in the myTable table.
|
|
|
|
|
Hi all,
I resolved this problem.
After the statement:
myListBox.DataSource = tbl.DefaultView ;
It call to the event "Selected Index Change" of the listbox. In this event, I used a statement:
string code = myListBox.SelectedValue.ToString(); But myListBox.SelectedValue.ToString() return type DataRowView (not code value, because the datatable includes two columns), and it created the error.
So, I moved the setting DataSource after setting DisplayMember and ValueMember then it is ok
|
|
|
|
|
Cool. Thanks for posting the solution here.
|
|
|
|
|
In a C# 2008 desktop application, I am finding that there are processes that are not released once when the application finishes executing.
Every time this application runs, there are more processes that are not released. I want to mention this application was originally written as a console application, but was changed to a windows application since I did not want all the dos popup windows.
I do want to mention that in this application the following is not occuring:
1. When some of the objects are created, there is no dispose on the objects.
2. Some of the linq statements do not have a using clause on them.
What kind of code could be causing this problem?
Thus can you tell me, point me to a reference, and/or show me code on how to reolve this problem?
modified 15-Feb-13 15:42pm.
|
|
|
|
|
classy_dog wrote: What kind of code could be causing this problem?
A "foreground" thread that should have been a background thread; the app would be running on the background until the thread dies, whereas a backgroundthread is terminated when the app closes.
That's assuming that you're launching these processes; otherwise they wouldn't be related to your code.
(Just to check, with a process, you did mean a "running executable"?)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Should every program have a app.close or exit on them?
|
|
|
|
|
Yes/no.
A Console-app would exit when the Main-method exits.
A Windows-app would exit when you call "Application.Exit" or when the user closes the application (using Ctrl-F4 or whatever)
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Install a profiler. Run it. Follow the recommendations.
|
|
|
|
|
When looking on the internet, it looks like profiler is only in the premium and standard edition of .net. My company is using the professional version.
Is there another tool that you are aware of that I could use?
|
|
|
|
|
Try typing C# code profiler in Google and try out some of the suggested options. When did people lose the ability to research?
|
|
|
|
|
dears
i used to use the following c# .Net 2 code to open autocad 2007 in windows xp sp2 , i just have to add 3 ref. to my vs2005 project (acdbmgd.dll , acmgd.dll , AutoCAD 2007 Type Library )
public Autodesk.AutoCAD.Interop.AcadApplication vAcadApp;
vAcadApp = new AcadApplication();
vAcadApp.Visible = true;
vAcadApp.WindowState = Autodesk.AutoCAD.Interop.Common.AcWindowState.acMax;
vAcadApp.Documents.Open(FileName, null, null);
now i am trying to reuse the same code but in windows 7 64bit using also autocad 2007
i got a very random results , some times it worked so fine and some times not !! and
if it didn't work , i got the following errors
Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 800702e4.
and sometimes
Retrieving the COM class factory for component with CLSID {28B7AA99-C0F9-4C47-995E-8A8D729603A1} failed due to the following error: 80080005.
kindly help me thanks bye
|
|
|
|
|
Your code is runnig 64-bit and you're trying to load a 32-bit component. You cannot mix 32- and 64-bit code in the same process.
Go into your project properties on the Compile tab and change the Target from AnyCPU to x86. This forces your app to run 32-bit only, and hence will work with 32-bit components.
|
|
|
|
|
|
Then try reversing it. Change it to x64.
|
|
|
|
|
the same error
seem that i have to use a newer autocad 2012/2013 to be fully compatible with win 64bit
|
|
|
|