|
Yes u can use OLeDBConnection & ODBCConnection to connect with SQL 2005
but .Net provided SQLConnection class to reduce the overhead while connecting with SQL using OLeDB or ODBC
SQLConnection specifically built for SQL. So if you use SQLConnection it will save time and your application will be more efficient as compared if you ODBC or OLeDB
|
|
|
|
|
The type or namespace name 'Windows' does not exist in the namespace ' System' (are you missing an assembly reference?
This is an error occured while i try to include system.windows.form namespace.
can anyone tell me why?
|
|
|
|
|
Did you add System.Windows.Forms.dll in your references?
Life is 5: 3 me, 1 you.
|
|
|
|
|
|
Add a reference to System.Windows.Forms. This might remove the error.
Loading signature. Please wait...
|
|
|
|
|
|
Hi to all,
I've got a little problem with visual studio 2008.
When I create an inherited form the IDE crashes. I've tried it with C# and VB but the result is the same.
In particular, I created a winform with protected fields and methods (a lot of these with access to a DB) an then I added a new Winform extended the previous. When I've tried to visualize the designer the ide has crashed!
How can I do ?
Many Thanks!
|
|
|
|
|
Had you previously done this with VS 2005?
|
|
|
|
|
I think I've got found the problem. Infact, I've seen that implementing the load method of the form for accessing to a DB, designer crashes when is opened on the inherited form.
I didn't tried to implement the show method of the form class with the access to DB.
What do you think about?
Thanks to all !
Bye
|
|
|
|
|
Hi all
I have a project in which I have to communicate with a serial port on a piece of hardware. The hardware connects to a router via a standard Ethernet cable and is assigned an IP address and the serial port has a port number of 49510.
What I am hoping to do is send a string such as "1;0;FF,30,30,00,A2,32,EF;;;" from a remote computer on the network, to the serial port and then to listen for a response. I think this needs to be in TCP/IP format however I'm just new to C# socket programming and not sure how to achieve the end result.
Can someone please let me know if I can achieve this by writing a client socket program that connects to a server which then routes the string to the hardware's IP address.
Any help would be greatly appreciated.
|
|
|
|
|
|
Thanks Rob, sounds exactly like what I need, I'll look into it.
|
|
|
|
|
|
Hi,
I have table stored with image like this, with column as imgid & img
(Imgid) Img
(1) Binary Data(Stored image as BD)
(2) Binary Data
How can i display those images in Image control by setting Imageurl,is it possible to set path to database?
I have not used any file to store, i am storing image directly to DB and want retrive it from database and display in image control.
|
|
|
|
|
No, you can't set the path to the database. You have to get the data from the database and load into an Image, which you assign to the Image property of the control.
Unless this is a web page (despite the question is not in the ASP.NET forum)? Then you need a proxy page that gets the image data from the database and writes it to the response stream, and you use the url of the proxy page as ImageUrl.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi,
Can i have some link or sample program on that which u have stated as a beginner i need that....dont mistake me..
|
|
|
|
|
Hi!
In below code if dr.IsNewOrUpdated is equals to 1 I want to change the font of the text how can i do this
please help. any better suggestion to code below will be greatly appreciated
if (dr.IsNewOrUpdated != 1)
{
_ws.Cells[i, (int)ExcelColumnIndexEnum.EnglishColumn] = dr.English;
_ws.Cells[i, (int)ExcelColumnIndexEnum.TranslationColumn] = dr.Translation;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ContextColumn] = dr.Context;
_ws.Cells[i, (int)ExcelColumnIndexEnum.CultureColumn] = dr.CultureCode;
_ws.Cells[i, (int)ExcelColumnIndexEnum.HFVersionNumberColumn] = dr.HFVersionNumber;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ResourceSetColumn] = dr.ResourceSet;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ResourceKeyColumn] = dr.ResourceKey;
}
else
{
/*Highlight the entire row or change the font of text in each cell*/
_ws.Cells[i, (int)ExcelColumnIndexEnum.EnglishColumn] = dr.English;
_ws.Cells[i, (int)ExcelColumnIndexEnum.TranslationColumn] = dr.Translation;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ContextColumn] = dr.Context;
_ws.Cells[i, (int)ExcelColumnIndexEnum.CultureColumn] = dr.CultureCode;
_ws.Cells[i, (int)ExcelColumnIndexEnum.HFVersionNumberColumn] = dr.HFVersionNumber;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ResourceSetColumn] = dr.ResourceSet;
_ws.Cells[i, (int)ExcelColumnIndexEnum.ResourceKeyColumn] = dr.ResourceKey;
}
|
|
|
|
|
Excel.Range.Font.Color = ColorTranslator.ToOle(Color.AliceBlue);
You can use this to change the font color.
Loading signature. Please wait...
|
|
|
|
|
thanks but how do i implement this in my case?
lets say If i want to change a particular cell color for instance
_ws.Cells[i, (int)ExcelColumnIndexEnum.EnglishColumn]
_ws means worksheet.
|
|
|
|
|
here is an answer if anyone needs.
((Range)_ws.Cells[i, (int)ExcelColumnIndexEnum.EnglishColumn]).EntireRow.Interior.Color = 16777164;//.Bold = true;
((Range)_ws.Cells[i, (int)ExcelColumnIndexEnum.EnglishColumn]).EntireRow.Borders.Color = 00000000;
|
|
|
|
|
How to retrieve Language of your current window operating system.
Like if you are working in spanish windows XP then get the language spanish.
|
|
|
|
|
Check System.Globalization.CultureInfo.CurrentCulture . It might help.
Loading signature. Please wait...
|
|
|
|
|
hi
First thanks for reply.
actually its not working
i have used
String OSLanguage =System.Globalization.CultureInfo.CurrentCulture.EnglishName;
but it is giving information of my application's language not of OS langauge.
I have to use that code which will give Language information of current running windows OS.
|
|
|
|
|
String OSLanguage =System.Globalization.CultureInfo.InstalledUICulture.EnglishName;
it is working fine
|
|
|
|
|
DateTime today;
My new instance today has new members....
I am a beginner and this might sound like a dumb question but can anyone tell me why after a create an instance of DateTime Class.....I get new members magically show up in my new instance?
Whereas DateTime has a short list of members.
Thanks
|
|
|
|