|
I try to connect to oracle database without using DSN.
Here is my part code:
odbcConnection1 = new System.Data.Odbc.OdbcConnection();
string strConnect = "Driver={Microsoft ODBC Driver for Oracle};"+
"Server = RISK.CINERGY.COM;UID=user;PWD=pass;";
this.odbcConnection1.ConnectionString = strConnect;
I got error as below:
Error[IM002][Microsoft][ODBC Dirver Manager] Data source name not found and no default driver specified.
Can anyone tell me how to deal with it?
Thanks for your help.
|
|
|
|
|
Is there a way in gdi+ to set text kerning?
I tried using SetTextCharacterExtra with current graphics HDC, but it seems
to work randomly.
For example with arial font it works up to size 13 (with extra spacing set
to 20)
Once I try to draw with size 14 it just ignores the setting.
Is there some limitation to that function, or is there any other I can use?
Thanks.
|
|
|
|
|
Hi!
Does anyone have a simple sample to access msi files, I need information from varius tables and properties, this is quite simple in vbscript, but I need to do it in C#.
btw: first post
|
|
|
|
|
Hi Guys,
I am trying to hide the scroll bars in the Mdi Parent form by setting the autoscroll property to false but it is not working.
Please tell me how to hide the scroll bars in the form.
Regards
AAmir
|
|
|
|
|
Hi, i've created a program and i want to install it on a computer. It says i have to install the .net framework before running the program. is there an other way to install it without the .net framework? (copy some dll to surtain directories??)
|
|
|
|
|
Nope. Not that anyone is going to support anyway...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The quick answer to your question is no. One of the most important part of the .Net Framework is the CLR “Common Language Runtime”. This block of code provides the environment in which .Net programs are executed in. You can download the .Net Framework from Microsoft free of charge at ( http://www.microsoft.com/downloads/details.aspx?FamilyID=262d25e3-f589-4842-8157-034d1e7cf3a3&DisplayLang=en ) This download includes all that is needed to run applications developed under .Net Framework.
|
|
|
|
|
|
Hi all. I haven't found an answer to this through quite some googling and searching, so I hope someone can provide some tips.
Here's the deal:
How can you call unmanaged code from a C# app?
Yeah, I know about a few ways to do it, but they all seem to rely
on the DllImport attribute initialized with the name of the DLL to be called at compile-time.
For instance:
[DllImport("msvcrt.dll")]
in my case, I will not know the name of the unmanaged dll to be called
until run-time. The name of the dll will come from a config file.
So, imagine
string unmanagedDll = this.GetUnmanagedDllNameFromConfigFile();
and now, is there any way to *programmatically* do the equivalent of
[DllImport(unmanagedDll)]
?
Thanks in advance for any suggestion,
F.O.R.
|
|
|
|
|
|
Thanks, that might be just what I was looking for.
F.O.R.
|
|
|
|
|
I am planning a new project and got some great ideas on how to do things.
Since it is version 2.0 of the project and the whole application needs a rewrite (the first version is approx. 3 years old now and was done without a decent design) I might as well try something new.
I want to build the application using the 3-tier design: GUI, Business Logic and Data-Access. I want to make it possible to both use a database and a webservice for the data-access. Also I want to add offline-capabilities to the application so that if the webservice fails the users can continue their work as normal.
So far my testing with hand written proxy classes for the webservices and the classes for the database is going great. It really seams to work, you can switch between them without much hassle.
But my big question is, should I use datasets or should I write my own custom business logic classes. I like the dataset because it's a lot easier and it works great. Hand-made business classes are not really my favorite since I don't exactly know how to pick that up.
WM.
What about weapons of mass-construction?
|
|
|
|
|
I think you shouldn't think of the bussiness logic as a matter of chosing the right one between DataSet and biz logic classes.
Think about the key concepts such as transactions, security (authorization and authentication), work flow, retriving paged data, user sessions, etc..
By considering all these you are able to find a good, scalable, maintainable solution. However finding the right solution is a lot difficult.
Bulent Keskin
www.bulentkeskin.net
Software Developer
|
|
|
|
|
I already have a good solution for security, the main problem is really the data. DataSets offer huge advantages when it comes to working speed. I don't need to write all the classes for my application instead I use a DataSet to retrieve and update data.
Do you know any examples of paged data access and using transactions combined with the use of datasets?
WM.
What about weapons of mass-construction?
|
|
|
|
|
After reviewing the enterprise library I am pretty convinced that it would be quite useless to make something like that myself. The first tests look good and the framework is easy to work with (aside from the configuration wich is rather confusing sometimes)
Thanks for the help
WM.
What about weapons of mass-construction?
|
|
|
|
|
I want to make a simple program...and if i can someone listen for this action and get a target programs handle i can close this freekin annoying popups "You have exceeded your profile storage space..." that occur when i login to this schools console. zz it's making me nutz :P
|
|
|
|
|
Hi everybody,
I read that vb.net supports custoom events. But c# does not. Is any equivalent for custom events in c#? I tried a lot. but couldn't find one. Please help me.
Regards,
Rathish P S
|
|
|
|
|
|
Hi.
For obtain index of the first visible ListViewItem of a ListView I can use the the TopItem Properties. I would obtain index of the last visible ListViewItem.
How i can do?
Thank's.
Gianpiero from Italy
|
|
|
|
|
Hi!
One way to do this is to use ListView.GetItemRect() to get the height of a single item and divide the ListView's Height by this value.
Then you have the number of visible items in your ListView and can calculate the index of the last visible Item.
Regards,
mav
|
|
|
|
|
I already tried your solution. but it isn't the right solution.
This because the value that I obtain from ListView.Heigth/ListView.GetItemRect().Heigth is a number that not correspond to real a visible object. This values is number of displaied object + tot; where tot is variable and its value change when I try to resize the control.
Tank so much.
|
|
|
|
|
The solution _is_ correct, how else would the ListView draw its items?
I just didn't give you ready-to-use code but thought you could work it out from there, but obviously I was wrong.
So here's the full code - I explicitely tried it and it does work.
int first = listView1.TopItem.Index;
int h_tot = listView1.ClientRectangle.Height - 1;
int h_hdr = listView1.GetItemRect(first).Y;
int h_item = listView1.GetItemRect(0).Height;
int cntVis = (h_tot-h_hdr) / h_item;
int last = Math.Min(listView1.Items.Count-1, first+cntVis);
mav
|
|
|
|
|
Ok its right!!! I tried again and I resolved mi problem. Thank yuo very much.
Gianpiero.
|
|
|
|
|
Hi, is there a simple way to convert formats like BMP GIF and so on to the JPEG format? How do I do this?
|
|
|
|
|
Yup, this should do it
Bitmap image( @"C:\mypic.bmp" );<br />
image.save( @"C:\mypic.jpg", ImageFormat.Jpeg );
--
Help me! I'm turning into a grapefruit!
Buzzwords!
|
|
|
|