programmingisfun's Q&A profile
Visual Basic deleting a record from a sqlexpress db
Hi I am using the code below to delete the current/active record from my Sql express db If (MsgBox( "Are you sure you want to delete this record " , MsgBoxStyle.YesNo) = MsgBoxResult.Yes) Then BindingSource1.RemoveCurrent() BindingSource1.EndEdit() End If This does remove the record. However if I close the app and go back into the app the record reappears How do I get the app to permanently delete the record without it reappearing I have tried placing a save button on the form to try and save after deleting. code below Me.LaheySerTableTableAdapter.Update(Me.Database1DataSet4.LaheySerTable) This doesnt save and gives the following error.. Update requires a valid DeleteCommand when pass ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Problems with playing Sound
My Sound class is the exact same one as the one from this tutorial: http://xbox360homebrew.com/blogs/audio/archive/2006/09/11/193.aspx I have done exactly as that tutorial states and have managed to get the music to play in the game I am working on. However, there are situations where the music will stop playing for unknown reasons. For example, when I am in my Game's menu, the music plays just fine and never stops. However, when I click the start game button and start playing my side scrolling game, the music stops after 20 seconds or so of playing my game. I should also mention that when I shrink my client window, the music plays just fine. So it only accures when the client window is at  ...Show All
Visual Studio Express Editions Problem installing.
Hey. I just downloaded Visual C++ Express Edition 2005. I go to intall it, everything seems to go ok, and then it gets stuck here. It will not go anywhere past that. I don't know what I should tell you about my system but here is what I could think of. Windows XP Home SP2 Intel Pentium 4 processor Thanks for any help. alpsinan wrote: I have the same problem... nobody here knows a cure for that other than downloading the cd image If you are able to download the CD image and make a CD-ROM, that is a much better solution. First, you can reinstall easily if you every need to. Also, if you don't install everything the first time, it is always possible to refresh from the CD image when you wan ...Show All
Visual Studio Express Editions Multithreading for dummies
Okay, I want to create a simple worker thread. Easiest method possible. Press a button and have some stuff happen in the background. From my reading I thought AfxBeginThread would be the way to go, but I'm getting an "identifier not found" error when I try and compile. Is there a header I need to include for this Or something else I need to do to make it work Thanks. I managed to get threading working with _beginthread instead. But I can't figure out how to have my thread talk to my GUI. I'm using the visual c++ form designer to create a form, and then have a button click spawn a thread to do some stuff. But Id really like the thread to be able to print stuff in my textbox for example to keep tr ...Show All
Visual C# Date format validation
Hi there: I plan on allowing my users to customize the date input and display format. I toyed with the idea of giving then a finite list of formatting options (like MM/dd/yy, MM/dd/yyyy, etc.), but then I realized that they could be educated in using the formatting attributes, thus gaining access to the whole spectrum of date formatting attributes. Now, because they need to be educated, there will be mistakes. This date formatting string is entered through a setup process and it is then saved "as is" in some data store. Because of human input, the format string will need to be validated. Apart from the obvious checks and balances (allowed characters, "usual" formats, etc.), is there any way that the data for ...Show All
Visual Studio Team System How do I recover from missing .mdf and .ldf files
Hello, My project is expecting .mdf and .ldf files in the DesignDB folder of my solution folder. Somehow they have disappeared. This is undoubtedly due to a machine crash earlier today. How do I recover from this position How do I tell the project to recreate the design database and therefore those files On a slightly different thread, shouldn't you do something to mitigate the risk of this happening Machine crashes do happen as we all know. -Jamie Hi Jamie, AFAIK the answer (at least for RTM and the last CTP's) is different than what you posted. 1. You open the project with VS. 2. VS will try to ATTACH the <projectname>_GUID database using the saved mdf and ldf files. (and compares ...Show All
Visual C++ LNK2019
Hello, this will probably seem very easy to any c++ guru but I'm having a problem with the error below. I'm writing a CustomAction dll in C++ 8.0 for an MSI installation. I have a function called UpdateDispatcherAppConfig and in that function I want to be able to call a shared function which is defined in a separate class file. I don't want the shared function to be exported, I have included it so I can share some of the code that is being called from two different custom actions. What do I need to do to be able to call a shared function in a separate class Error 1 error LNK2019: unresolved external symbol "public: static unsigned int __cdecl Util::UpdateConfigFile(unsigned long,wchar_t *)" ( UpdateConfigFile@Util@@SAIKPA_W ...Show All
Visual Studio Team System TFS Evaluation remaining time
Hi, Is there a way to check how many days of evaluation are left in my TFS server Even a messy way like looking in the registry or calling a web service is fine ... Thanks, Eli Apologies Eli, Looks like it is 180 days after the RTM installation. Taking the date I did RC my instance would have expired this past Saturday and it was working just fine when I came in Monday morning. We upgraded to TFS Full this morning (which was painless). Hope that helps, M. ...Show All
Visual Studio Team System tsql errors when importing database
I'm getting some tsql errors when I imported my database. These same "errors" check just fine within the Enterprise Manager. Is there are way to sync up the 2 so VSTS isn't flagging sprocs that checked ok before in the database BTW--I did import the existing schema from my SQL2000 database. Thanks! Ok then...stupid question...how to I modify my local SQL Server settings then I'm using SQL Express and can't find where I'd make those sorts of changes. Unless everything just gets scripted ...Show All
Visual Studio Tools for Office How to catch all unhandled exceptions
Hi, I'm writing a COM add-in for Word and am wondering how I would go about catching all the unhandled exceptions thrown by my code. I have try catch blocks around the exceptions that I can deal with, but I still want to catch and log the one's that I can't. Any helps would be great thanks, Joel Hi Cindy, I do feel you didnt properly understand the question asked. I've just stuck with same issue - i want ALL unhandled exceptions in my Add-In to be somehow processed. For example. Assume we have a word add-in and a class in it that can throw exceptions. public class A { void SomeMethod() { // some code and then something terrible happened throw new Exc ...Show All
Visual C# Interfaces oversold???
First, I must admit that I am a C# novice and so I probably don’t have as much knowledge and experience on the subject of interface as most of you guys reading this post. After reading a few books on C# and interface design, I still can’t see and understand the real power of interface unless of course, we are talking about interfaces as a powerful concept in OOP ‘only’ and not as a powerful concept in the general sense. When I was first learning OOP I was quite suspicious about the ‘excellent features’ that OOP claims to be able to deliver to the world and I was right. For example, in reality OOP offers very little if any, code reuse. I am now having the same suspicion about interfaces even though I see a lot nice words used to d ...Show All
SQL Server Examples for using DirectRow method?
Hi! I was just wondering if there are any examples on how to work with the Script Editor, and more specifically how to use the DirectRow method I've seen some examples that say that the editor automatically creates the methods DirectRowTo<output buffer>, but it doesn't say how that is done. If I just specify Row.DirectRow(output buffer #), it says that the method is protected. Any help or just pointing me in the right direction would be greatly appreciated! Thanks! Jeff Tolman E&M Electric jeff.tolman@enm.com This should be a big help: http://www.sqlis.com/default.aspx 311 -Jamie ...Show All
SQL Server ALTER TABLE ALTER COLUMN [access-id] failed because one or more objects access this column
Hi when I'm upgrading table schema with alter statement I'm getting error like this ALTER TABLE ALTER COLUMN [access-id] failed because one or more objects access this column can Anybody tell the solutiuon plz. Thank u . vizai If you have any View /UDF With SchemaBinding on this Base table , you are not allowed to change or Drop columns or Table Object.. If you want to alter the table first you need to remove the SchemaBinding in all the views/UDF and change the column on Base table then recreate the Views/UDFs With SchemaBinding. If you have any Indexed Views when you remove the SchemaBinding all the Index on the Views will be removed, so you have to create them too.. ...Show All
Visual Basic Get IP-adress
Hi friends I'd like to have the code, to show MY IP-adress in a label. Thx in advance Marnik Dim h As System.Net.IPHostEntry = System.Net.Dns.GetHostByName(System.Net.Dns.GetHostName) Console.WriteLine(CType(h.AddressList.GetValue(0), IPAddress).ToString) Greetz, Geert Geert Verhoeven Consultant @ Ausy Belgium My Personal Blog ...Show All
Visual Basic Error occuring for one user only after upgrading to Visual Studio 2005
Here is my question: I have a Visual Basic Windows Forms application that was developed in Visual Studio.NET 2003 and was recently upgraded to Visual Studio 2005. After reinstalling the application one of my users is getting an error, but the strange thing is that this is happening to one user only, out of about 25. So basically, the application works fine for everybody except this one user. The error was not occurring before we upgraded to Visual Studio 2005. I have installed and reinstalled .NET Framework 2.0 on his machine a couple of times, same thing with the application, but the error is still occurring. I doubt it's something in my code because otherwise it would be happening to everybody else. I have tried unsucc ...Show All
