PeacError's Q&A profile
Visual C# getting the connectionstring from web.config
i recently upgraded to vs2005, and so far i'm very impressed. but i'm having trouble getting the connectionstring from my web.config. VS2003 - OleDbConnection dbConnection = new OleDbConnection(System.Configuration.ConfigurationSettings.AppSettings["nameOfConnectionString"]); i've learned that this is not the proper way to do it in vs2005. I read somewhere about doing it similar to this (see below). but haven't had any luck. Any help would be appreciated. VS2005 - string cnn; cnn = ConfigurationManager.ConnectionStrings["nameOfConnectionString"].ConnectionString; OleDbConnection dbConnection = new OleDbConnection(cnn); thanks To open the ConnectionStrings section of the web.config file ...Show All
Visual C++ Debug Assertion Failed at AfxGetResourceHandle
Hai any one please help me In this issue I am using a VC++ 6.0 Project in VC++.NET 2003 IDE (Only IDE is changed not code it is native code only which is written in VC++ 6.0) & My OS WinXP Professional It is compiled and build successfully. Actually my project configuration is an EXE, which I am calling from another EXE of VC++ only. My project contains only one dialog box, which will be shown when we select an option from the Main EXE When we are trying to show the dialog using if (dlg.DoModal() == IDOK) { m_selectedPAK = dlg.m_SelectedPAK; } in dllinit.cpp line no. 240 hInst = AfxGetResourceHa ...Show All
Visual C++ transition from C++ MSFlexGrid
I have an existing C++ application that uses an MSFlexGrid in one dialog. I am moving the application to VS2005 so it may be compiled for 64 bit architectures. Everything besides that one dialog is finished. Is the DataGridView the best path to follow moving forward What other options are there How do you use the DataGridView in a C++ program Is there some way to get compiler generated C++ files as there was with MSFlexGrid I did not write the original application, nor am I particularly proficient with Windows or Visual Studio. Any help is appreciated, and please state the obvious. There is a walkthrough for creating a Windows Forms Control in Visual C++ in the Guided Tour area that did not work. It mentions the possibili ...Show All
Windows Forms Insert / Update database using CurrencyManager and BindingContext
Hi, I just implemented the CurrencyManager and BindingContext using this link http://msdn2.microsoft.com/en-us/library/system.windows.forms.currencymanager.aspx , but now I can't update the Data Base. Here is the code I use. this .myCurrencyManager.EndCurrentEdit(); this .produtosTableAdapter.Update(DataSet ); The update method should go and store the information into the database, but it's not happening that, I guess that's because the data in CurrencyManager is not going to my DataSet, maybe I'm passing the wrong parameter in my TableAdapter, but I have no clue what parameter I should use instead of my DataSet. It does not throw an exception, the method goes without problem, but the update goes with the old information. ...Show All
Visual Studio Team System Reporting Services failure
For some unknown reason, the Reporting Services piece of TFS seems to have lost it's marbles as of 1/6/07. On this date, all projects began returning 0 for the Remaining Work, even though team queries show plenty of active work for each project. Each report shows the data warehouse is being updated regularly, there just doesn't appear to be any data in any of them. Other reports appear to be affected too. Any ideas Have looked at the troubleshooting post in this forum: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=154526&SiteID=1 , or the troubleshooting guide in the help topics http://msdn2.microsoft.com/en-us/library/ms244674(VS.80).aspx Allen ...Show All
Internet Explorer Development Prompting Users When Using window.close() In IE7
Microsoft IE Developers, The question, everybody seems to be asking! What are our alternatives regarding not prompting users when we are automatically closing a browser Life was so much easier before IE7. I could simply use: window.open("page.aspx","_blank","resizable=yes,scrollbars=yes,toolbar=no,status=yes"); window.opener = top; window.close() which would work perfectly for what I am trying to achieve for my ‘trusted intranet web applications’. How can I launch a browser for a ‘trusted intranet web application’ that only displaying the title and status bars in IE7 Should I be looking at .hta files to launch a new web brows ...Show All
Smart Device Development How to use database for pocket pc application
Hi I have a need to work on pocket pc application. Scenario: In general user will take database backup from database server to local system. User perform some changes to his local database based on his requirement. Again user connects to database server and click on update, local database should update to server database by informing each record status to the user. ex: record 1 updated / call closed do you want to update Here local database is going to be Pocket pc database and server database is on SQLDatabase. Can any one suggest best way to implement this feature in Windows Pocket pc, c#. I would appreciate your reply. Thanks, Thank for reply, RDA is works fine, but RDA and SQLCeReplic ...Show All
Windows Forms OnPaint Override Problem with UserControl that contains Panel and ListBox Controls
I am attempting to creat a custom user control. It contains a Panel and a ListBox control that I use to change view modes of the control. When I attempt to paint on the user control itself nothing is painted. If I respond to the OnPaint event of the Panel control and paint there then the drawing shows. If I respond to the OnPaint event of the ListBox control and paint there then nothing shows. I am attempting to implement a drag and drop ghost image when I paint on the UserControl. I assume it is possible that when I try to paint to the UserControl that it is somehow painting to the background of the UserControl and is not painting over the ListBox and Panel Controls contained therein. Is th ...Show All
Visual C++ Is there a macro which converts a 32 bit signed integer to 64 bit unsigned integer ?
Hello All, Is there a macro which converts a 32 bit signed integer to 64 bit unsigned integer Thanks in Advance, CPPUser7 Sorry for the late response. All your answers are correct, you don't get any warning while converting a 32 bit signed to 64 bit unsigned. My problem was with some other part of the code throwing warnings. Thanks a lot for you responses ...Show All
Visual C# Disabling Cell navigation in datagrid
hello all, in my GUI, in a datagrid i have three columns namely: Read (Checkbox ), Write(Checkbox), Fields (text). now what i want to do is, i just want to navigate the cell selection in the read and write column only. i dont want to move the cell selection in the fields column. can anyone help me with the code for doing this or can it be solved by setting any property of datagrid. plz help me with this soon. Anur While a cell can be read-only to prevent it from being editable, the DataGridView does not have built-in support for disabling a cell. Normally the concept of "disabled" means that the user cannot navigate to it and usually has a visual cue that it is disabled. Ther ...Show All
SQL Server Rounding a number
Hi, I need to round a number in a table to either 2 or 4 decimals: =((Sum(Fields!Total.Value) -Sum( Fields!Total_used.Value))*100)/(Sum(Fields!Total.Value)) & " %" This results in a number like 91,1243656438345% I would like it to be rounded to 91,1244% or 91,12% Is there any builtin round-function, that does not just turn the number into an integer Thanks for your help You should be able to do this using the Format function =format(Sum(Fields!value.Value),"#,###.0000%") or =format(Sum(Fields!value.Value),"#,###.00%") ...Show All
Visual Studio Express Editions how can i populate a combobox from multiple textboxes and save
Hi i would like to know how i can add the text in multiple textboxes to the drop down list of 1 combobox and save the list to a user setting so when the program is restarted the list will still be there. Thanks I'm new at programming. i have not yet messed with datat bases. can you post a sample code. Thanks ...Show All
Visual C++ Visual C++ 6: creating and calling own .lib function
Hi all, I created a .lib file and what configuration need to be done on Visual C++ so tt I can call the function in the .lib in another dll file I encountered some error LNK2001 and LNK1120 when building the dll. Thanks Rgds Hi, Thanks, I did the same thing as you mentioned but when I compiled it is ok but when I try to build as dll it gives the error LNK2001: unresolved external symbol.. and also fatal error LNK 1120: 1 unresolved externals. Rgds ...Show All
Audio and Video Development Picture In Picture Sample for Toshiba Player
Thank you Peter, for the PIP sample. I got it to work in the MS Simulator. However, when I attempted to write code for the Toshiba player I had no success. I use the Sonic tool to mux. The playlist generated by the Sonic tool does not reference a "SecondaryAudioVideoClip", instead a "SubVideo" is referenced as part of the "PrimaryAudioVideoClip" <PrimaryAudioVideoClip titleTimeBegin="00:00:00:00" src=" file:///dvddisc/HVDVD_TS/EVOB001.MAP " titleTimeEnd="00:04:22:24" dataSource="Disc"> <Video track="1"/> <Audio track="1" streamNumber="1"/> <SubVideo track="1"/> </PrimaryAudioVideoClip> When I m ...Show All
Visual Studio Express Editions activating a file on a remote computer
how can i activate a file on a remote computer inside a lan connection i dont want the users to be administrators on this computer, instead i would like to insert the administrator user and password to the code. (the idea is to restart an application from a remote computer by any user who uses this program) you'll have to bare, i'm almost done - new to WMI myself so its a learning curve. what I have so far is this but of course in a not workable state: //import the System.Management.Instrumentation namespace //run process on remote computer: dim theApplicationToRun() as object = { "yourapp.exe"} Dim theManagementPath as new ManagementPath("\\Server\root\ ...Show All
