karthik.sr's Q&A profile
.NET Development Casting string issue in C# with uniqueidentifier type in SQL 2005
Hello all, This is my first C# tool which access a database and I am facing the following issue: System.InvalidCastException was unhandled Message="Unable to cast object of type 'System.Guid' to type 'System.String'." ... private string firstSTBid; private string lastSTBid; .... if ( table.Rows.Count > 0 ) { firstSTBid = (string)table.Rows[0][STBid]; <============== exception here lastSTBid = (string)table.Rows[table.Rows.Count - 1][STBid]; } In SQL 2005 the STBid field has type: uniqueidentifier Its content is something like: c9fa390f-b78b-44d1-aa09-26b141926a06 Can you guys help Thank you so much Joao ...Show All
Visual Studio Express Editions Tell Us Your Express Story and Win $100!
Want a chance to show off a cool way you’re using Visual Studio Express or SQL Server Express We’re looking for your stories! Tell us about something that makes your life easier or is just plain fun and if we like it enough to include in a feature article, we’ll give you a $100 gift certificate to Amazon.com! http://msdn.microsoft.com/vstudio/express/support/hero_promotion/default.aspx Well I have been using VB 2005 Express for a while now and I must say I enjoy it. I have a lot of friends who love to play games. Some of my friends will, on average, have about 20-30 CD Keys. I do believe that my friends tend to pick up my habbit of losing items. Well when you own about 300 dollars in games and another 400 i ...Show All
Visual C++ DateTimePicker Control : How to set back color?
Hi, I'm using C++/CLI 2005. I'm trying to customize a " DateTimePicker " control by changing it's background color. For the calendar part, no problemo. I've just set the " CalendarMonthBackground " property to the desired color and it worked like a charm. Now I had to soon realize that my "input" part of the control, if I can call it this way, still have that same white background color. I've tried to use the " BackColor " property but it had no effect at all. Still stuck with that same "white" background... How can I change it Any clue Thanks in advance, Stephane Have you seen remark from ...Show All
Gadgets attachElementBindingSync
Can anybody explain what is this binding(Web.Bindings) all about and when to use "attachElementBindingSync" method Thanks Thanks ToddOs for your reply...I understand "bindings" little bit now.... But I am still confused when can I use my own bindings using "attachbindingsbysync". I would definitely like to see more examples if you can provide. ...Show All
Community Chat Kyro KidSafe Browser (alpha)
Hello all, I am making a "KidSafe" browser for kids. Please download my program and post any noticed bugs,etc. It takes only minutes to set up. I am 10 years old, so who can make a browser for kids better than a kid Progress: Final will be started in January Thanks you everyone for your contributions and encouragement. *Has 3 tabs for browsing. *Has a "My Websites" button with up to ten of your programmed websites in it. Beta Features: *Has 3 tabs for browsing. *Has a "My Websites" button with up to ten of your programmed websites in it. *Talking Help guide *A new install program Updates in final version: *Button text replaced with graphics. *A game room with games, and fun KidSafe software (suc ...Show All
Visual Studio Express Editions Embedding resource AFTER assembly is built
How can I embed a resource (in my case, a text file) to a .NET executable after I've compiled it A managed resource. What I'm trying to do is make a program similar to Game Maker . Currently I've written a sprite editor, background editor, object editor, and level editor, and all the data (levels, images, etc..) is saved in a large text file with the extension .vgdgame. The theory behind the "Build EXE" button to convert the game into an assembly is the following: - There is a runtime program that loads the embedded main.vgdgame file and runs the game. -When the runtime program is built, there is no main.vgdgame file. -When the user clicks "Build EXE", they select where they want to save their .exe, the ru ...Show All
Smart Device Development SQLClient and Pocket PC 2003
Hi again!! I'm developing an application in Pocket PC 2003 to conect into a DB in SQL Server. Im using SQLClient class. when i create a conection string an instances a sqlconnection to connect to my DB it returns me an "SQLException: The source doesn't exists or cannot be accesed" or something like that. The case is that, I use that connection in so many others application and it's not possible it doesn't exist. I use the same Connection String in other application and works perfectly, Someone knows what can be My connection and the string Private sqlcon As SqlConnection Dim cs As String = "Data Source=1 0.0.1.0; Initial Catalog=Prueba;User Id=fadmin;Password=;" sqlcon = New SqlConnec ...Show All
.NET Development DataGridViewCellStyle Editor
Hello All, I am creating a custom DataGridView and have the need to provide design-time property editing support for a couple of DataGridViewCellStyle properties. I would like to use the built-in CellStyle Builder, but can not find it anywhere in the documentation. Can someone point me in the correct direction Thank you kindly, ...Show All
Windows Forms Restarting an application?
I have an application that uses one form called dx, its an instance of a class called WinForm which extends the form class. It pwns. I use the following code to quit the application: dx .Close(); Application .Exit(); And it works flawlessly. However, I'd also like to have a code that restarts the application, and with time, a code that reinitializes the DirectX device with new parameters (like if someone wants to change the resolution). I decided that if I call the close method for my form, and then call my program's main function, it should work. After all, I'm just closing the form and reopening it. This is the code I'm using: dx.Close(); dx = new WinF ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Debugging Problem
I recently downloaded XNA, and I am having a problem, I think it has to do with my graphics card, but I am not positive. When I go to start debugging, it starts debugging but then it encounters a problem. A box pops up saying, Microsoft.Xna.Framework.Components.NoSuitableGraphicsDeviceException was unhandled Message="The values used in the attempt to create the GraphicsDevice were invalid." I haven't been able to find a solution, and any help would be appreciated. Thanks!! This thread here explains your problems, details the fix and explains what it means if the fix specified doesn't work. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=688024&SiteID=1 Basically, the th ...Show All
Visual Studio using Visual Studio to build C/C++ projects with dependencies
Hello everyone, I am using Visual Studio to create a solution, and in this solution, there are several projects which have dependencies, for example, the output of one project is a DLL and another project will utilize it to build an executable application. My question is, whether Visual Studio could recognize the dependencies and build projects in correct sequence Means, building DLL project first, then build the executable application. If Visual Studio could not, I have to build them manually one-by-one in the correct sequence. thanks in advance, George Hi Adrigo, Adrigo Gallus wrote: Yes, for C# and VB projects. Don't know for C++, but its unlikely that it is different. You indicate t ...Show All
.NET Development System.Speech.Recognition GrammarBuilder.AppendWildcard
I can't find an official System.Speech.Recognition user group (outside of Google), so I am posting here instead. I am using the GrammarBuilder.AppendWildCard to build a set of phrases such as: the apple * tree or: * drives a * while * It matches the phrases very well, however the result text matched, returns a '...' not the words matched in the wild card. So 'the apple was in the tree' returns 'the apple ... tree' to the recognition event. Is there any way to get the wildcard words back, in this case 'was in the'. Thanks, Simon ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Future of DirectX
I'm starting to get worried about DirectX, because mostly it becomes deprecated, first there was DirectPlay, and now it is the same thing for DirectInput and DirectSound, I've recently read that they are becoming deprecated in favor of XACT and XInput. Could you tell me why is this happening What will become of DirectX in the future Will be there only Direct3D, or will it disappear either I'd like to give you my opinion that deprecating good API's like DirectInput and DirectSound is a bad idea. Take a look at XInput- it allows only xbox controllers, and what about mice, keyboards, or other joypads And mostly I'm concerned about DirectSound, In Vista there is no hardware support for it, does that mean I have to stop working with Direc ...Show All
Visual Basic Storing variables outside of RAM?
I'm writing a program that stores values in variables, but I need those variables to hold their values after the program closes, as I am making an organizer for things. I was thinking of writing them to a text file then retrieving them, but I know there's a better way. Thanks. example of serializing to xml (and deserializing) http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=724142&SiteID=1 basically Xml Serialization allows you to store objects to xml, then restore them back once again when the application starts back up (when you have the code in place). It's a create way for it doing everything automatically than say, reading a textfile, going through line by line, checking to see if that ...Show All
SQL Server Need help connecting java to mssql, I'm even lost at install
Hello, Hope anyone in here can help. I have tried to install the SQL Server 5 Express, but can't seem to get it to work properly. I got a terrible name set as default for my database, as well as a terrible name for my username. I can't find a place to change this to something more manageable. It is further set to windows auth, but trying to set it to both, and trying a username (and password) always gives me a log in error. I've tried searching all over the net and in here for a simple tutorial, but can't seem to find one that helps me more than it confuses me. ***** The second part of the problem is that I have a java program which I want to connect to the database and use the tables in it, but I am at loss to how I can find what username ...Show All
