I'm using Npgsql to connect to postgresql in my dot net app. I create a new connection every time I need to perform a database operation. I store the username and password and if the user goes to another windows form, I pass the username and password to the constructor and then create another connection. This seems wrong to me. Is there a better way to do this? :)
Martin Marvinski
Posts
-
Database connections -
Setting a new DataGridViewComboBoxCell valueI'm populating a DataGridView control using the Add Row method and an object array as the basis for that new row. All the cells work fine except the DataGridViewComboBoxCell which gives me an exception titled "ArgumentException: DataGridViewComboBoxCell value is not valid". How do I resolve this problem? thank you, Martin :rose::):):)
-
Changing read to read/writeHi Nish, Good to see you! I have been here a few times to look somethings up, but I haven't programmed in win32 for a few years. I've mostly been doing UNIX programming the last couple of years. I hope you are doing really well, Nish, you have a great attitude and are extremely talented. Sincerely, Martin. :)
-
Changing read to read/writeQuick question. I have a C++ application that copies a file off of a CD-ROM to the disk. When it gets to the disk, the file is read only. I haven't programmed in Win32 in a while and I've forgotten which function allows me to change a file from read to read/write. The file system is NTFS. Thanks in advance.
-
Program Files special folder location.How do I create a folder in the Program Files directory programatically? I haven't programmed in Win32 the last few years and don't have my win code to refresh my memory. I know it is some COM object function that gets the special location like Trash, Program Files, History.. Thanks in advance.
-
How do I add Boost libraries to VS.NET?:mad: X| I'm pulling out my hair trying to figure out how to add the wonderful C++ boost libraries to VS.NET. You get them here: www.boost.org. I can figure it out on UNIX but VS.NET is a mystery to me. :rolleyes:
-
Back to Windows.Just got back into a Windows development job after a couple of years in Unix. Good to be back although I miss the bash shell and Solaris 10. :)
-
Boost Libraries in VS.NET 2005Can anyone give me help in installing the boost libraries in VS.NET 2005 beta? :)
-
command line compilingHi. How do I compile a C# .net program via command line that uses Windows Forms? I get an error message when I put "Using System.Windows.Forms". I know the code is correct as it is a simple example. I know I'm just missing something minor. How do I get it to find the forms library, or do I have to specify something else when compiling via command line?
-
Funniest jokes.What are some of your very best? :-)
-
Post # 1,000Wow. That's a lot of posts! Are you trying to catch up to Nish?
-
Did David Kelly really kill himself?I seriously doubt it. How does this development bode for Tony Blair? Can he be a viable leader among suspicion that assassins had a hand in Kelly's untimely death? The Iraqi conflict seems to share a similarity with the Vietnam War in that it was started under false pretenses, e.g. Vietnam was predicated on the assumption the US ships were attacked in the Gulf of Tonkin. On the United States side, a group has managed to retrieve several documents that oil executives whom met with Vice President Cheney in April 2001 contained maps of Iraqi oil fields. http://www.judicialwatch.org/071703.b_PR.shtml[^] This sheds serious doubts about the credibility of both leaders. Do you see this as something that should cost both officials their elected positions in the next elections?
-
Money back guarentee?Has anyone ever done this with software? This is something that would be wonderful to offer, especially if you believe in your software. However, the obvious downfall is that people can order a software product, install it to their hard disk, send the CD back for a refund and cause the software vendor to go bankrupt. Palladium would make returnable software feasible, but until it is here, money back guarenteed software doesn't seem viable. On the other hand maybe someone does do this and has discovered a unique way to prevent the associated problems. If you have any ideas on this, share them. :-)
-
Web hosting?What web hosting company would you recommend if the #1 requirement is security and reliability? I want a company where I don't have to worry about downtime, hacking or viruses. I would prefer that they run OpenBSD on their servers and have a top notch SysAdmin staff. If you know of such a company please post the url so I can research them. Thanks!
-
Converting strings.Hi. I know how to convert strings to BSTR, COleVariant, and ect.. but how do you convert them back to regular ansi that the Windows API requires. Thanks in advance. Martin.
-
DeleteFile Function questionI'm using the DeleteFile Function in an attempt to delete the program that is running. How can a program delete itself? I tried renaming the executable before deleting it, and it does is rename it but doesn't delete it. I suspect you can't delete an open file or program in NT, but I'm sure someone here has found a way to make a program delete itself aka uninstaller.. Any help would be thouroughly appreciated. Thanks in advance friends!
-
Hurray US Troops.I'm here to voice my support of the US troops doing the right thing in Iraq. You have my support and God Bless America. Go kick some booty, and liberate Iraq for the benefit of its poor citizens who have long suffered under Saddam. This should have been done long ago, but unfortunatly Clinton had no backbone and too many Monika problems. Thank God George Bush is taking us in the right and moral path. Thank you Mr. Bush, and our allies the British and Aussies who are helping us with this effort. Tony Blair and John Howard, you are wonderful, and I thank you all for helping the US troops liberate Iraq.
-
Paint problem.I have an MFC dialog app that has a Webbrowser object in it. I put a bitmap as a background to that application and now whenever something covers my dialog app, the webbrowser control doesn't get redrawn. How can I fix this problem? This is probably an easy question for many of you to solve, but embarrassingly it has left me scratching my head for the last half-hour. Your help in answering my question will be greatly appreciated. Thanks in advance. :-)
-
US considering chemical weapons in IraqThe United States is considering using Chemical weapons to disable Iraqi soldiers in the event of a war. http://www.csmonitor.com/2003/0214/p02s01-usmi.html
-
Michael JacksonDid anyone watch that Michael Jackson special last night? All I can say is that man is completely nuts...:omg: