RohitAtKA's Q&A profile
.NET Development ExecuteReader requires an open and available Connection. The connection's current state is Open, Fetching
cmd.ExecuteReader Run-time exception thrown : System.InvalidOperationException - ExecuteReader requires an open and available Connection. The connection's current state is Open, Fetching. I'm having a issue with my program. My application does a search first, then the user has the ability to edit the search results. So first a datareader is created and the ExecuteReader is called and you know the rest. Then once the user is ready to submit their changes and executeNonquery is called and you know the rest. The code fails at cmd.exectuenonquery line. Here is my code First the user searches for records based off an id: Private Function RetrieveErrorRecords(ByVal ErrorID As String) As DataTable ...Show All
Visual Studio 2008 (Pre-release) Invalid Object Name in simple LINQ query
I get the following exception on a simple LINQ query to the NorthWindCTP database as follows; [1] Unhandled Exception: System.Data.SqlClient.SqlException: Invalid object name 'Customers'. I have tryed to permute the SQLMetal command line for the (A) /Pluralize and (B) /map options. Each time I get the same results (using variations of the SQLMetal output). The code is 'right out of the book' so to speak. I keep going throught the code but can't seem to find a problem (it compiles and mostly runs :-). If anyone has any suggestions I could use some help! Shawnk PS. As always, thanks ahead of time for the response. ---------------- -------Code ---------------- string l_db_con_str = @"Data Source=MYSERVER\SQLS ...Show All
Visual Studio 2008 (Pre-release) XLinq
Has anyone done much with XLinq [btw - in writing this i discoved a 36 page doc on XLinq which i'll read tomorrow] I have now listened to Anders Hejlsberg, the C# 3.0 videos and read some on this. Now, LINQ is an excellent technology, but i hear two things from XLinq. 1. It improves XPath queries. In numerous projects people have ran into issues with this, but moreso when namespaces are involved, or when you start doing some advanced XPath queries that work on descedents/ancestors. I'd like to know how easy people are finding doing this kind of advanced thing in XLinq. 2. Initializing the document. Now, i have read this for only a couple of days now, but although i can see the value in selecting via LINQ to create a new Xml ...Show All
Windows Forms Issue with Modal Dialog..
I have customized FormBase in which i have implemented a timer and that forms the base class for all the forms. I have also customized the DataGrid/DataGridView and some of the controls as textbox/maskedtextbox etc... When i set the form derived from that FormBase and set that instance of the derived form as Modal dialog as derivedForm.ShowDialog().... It diverted from the default action i can view the derived form even over the window of other application though the derived form is an MDI child of my application. Could anyone tell me what wrong i have had done in form base or other controls or should i have to do some more coding other than derivedForm.ShowDialog() to make it modal dialog Hi, if you're trying to moda ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Microsoft.Samples Samples is not a member of Microsoft
When I'm trying to use the Microsoft.Samples.DirectX.UtilityToolkit in Visual Basic Express, an error pops up saying that samples is not a member of microsoft. :( I don't understand what the problem is I already downloaded the new directX SDK. Thanks The DirectX utility kit is written in c# and therefore will not compile in VB Express. If you want to use Express products you need to get c# express (also at the bargain price of $0) and compile the DXUT classes to a class library. Then you can reference this class library from VB Express. ...Show All
Visual Studio Team System Newbie Question - Edit Existing Team Project
We have recently began using TFS. During the setup process, we downloaded and modified the MSF for Agile Software Development - v4.0 process template to include some custom fields with enumerations that we use internally. Example : Field Name : Department Enumerations: Finance Help Desk Business Development etc. We have recently need to add an enumeration to a field we created for an existing team project. Is there anyway we can update the process template to include this new field enumeration to an existing project What is the best method of adding this enumeration Should we change the database directly and if so, are there any issues we should be careful about any advice would be much appreciated!! ...Show All
Visual Studio 2008 (Pre-release) Multi-Monitor... no hardware drawing support
Hi, as a split off from this thread: http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=679032&SiteID=1 I'm working in the financial industry and virtually every deployed client machine uses a multi monitor setup. However, I noticed that as soon as I move a WPF application from the "base" screen to another screen it loses all hardware accalerated drawing support and everything is way laggy. Is this a known issue that is going to be addressed or what's going on here This even happens with the Expression Designer. Right now this makes WPF totally useless for multi monitor setups. Thanks, Tom I'm seeing the same problem. The display card is Radeon 9200SE. As soon as the app spans more than on ...Show All
Visual C# foxpro date format
I'm devoloping a windows application to retrieve data from foxpro table based on the date input by users. The following is the query I use for the selection select code from visits where visit_date= Does anyone one know which format shall I pass for the visit date 1)Is it in this format dd/mm/yyyy or some other format 2)Is there a way to set the visit_date to accept the format intended Note:I'm using vfpoledb. Hi Brother FoxPro dates are written in text as values surrounded by curly braces. An "unambiguous" date is preceeded by a caret - in other words: "{^yyyy/mm/dd} . Here's a VB example: Module Module1 Sub Main() Try & ...Show All
SQL Server Can we send a blob in a message.
Say i want to send a blob in a message from queue A to queue B. These locations can be geographically different. How can i implement this Also anything which i want to send as a message should be stored in the database. and then I should store it in a variable. this can be used as the message body. am I right Message bodies can be blobs, of type VARBINARY(MAX), thus the maximum supported blob size for SQL Server 2005 (2GB). Simply put the blob you want to send as the message body argument of the SEND statement. Service Broker will take care of delivering the message, even across geographical boundaries (it will fragment and reasable the message). When RECEIVEing the message on the target site, the or ...Show All
Visual C# How to convert string in ABCD format in to Unique integer
hi Is there any way to convert string in this format ABCD into a unique integer like 1234 Example: GWRS = 5232 SRWG = 7845 WTMS = 15 YOMS = 142 int X = ConvertMyString("GWRS"); private int ConvertMyString(string sTring) { } and so on ...... Thanks ... I don't care about getting large numbers. But there is an error in your code Error 1 'System.BitConverter' is a 'type' but is used like a 'variable' ...Show All
Visual Studio Express Editions Tabbed Browsing Help
Can i have a detailed tutorial on how to achive this, all the other bits of code i've found i can use but with much difficulty, so if anyone out there has a bit of spare patience can they go through, step by step, how to make tabbed browsing. thanks heaps in advance. Josef Stalin ...Show All
Visual Studio 2008 (Pre-release) WS* and bindings in WCF
Hello. I have a question regarding WS*. There are at least 9 pre-bindings prepared in WCF and there's custom binding. How can I tell by looking at the code or config file if I'm conforming to WS* or not. For example, I'd like to use WS-Addressing when communicating with Java client. How can I specify I'm using WS-Addressing, or how can I tell if I'm using WS-Addressing or not. Others stuff I would like to do include WS-ReliableMessaging, how can I specify that I'm using WS* thing I think this has to do more with the knowledge of WS" specs but I didn't have anywhere else to ask for help. If anyone can help me out on this matter, that would be greatly appreciated. Thanks. There is quite a thorough descri ...Show All
Visual Studio Anoying delay after every build cause and relief
We've just converted a large .NET 1.1 service application to .NET 2.0. The solution includes 17 projects. The build progresses roughly the same amount of time as the VS2003 build. But after success or failure, the IDE hangs for 30-45 seconds. There is no additional information sent to the output window, there is no additional information on the status bar, it just hangs, then the final line is sent to the output window: ========== Build: 17 succeeded, 0 failed, 0 up-to-date, 1 skipped ========== While this is only a few seconds it is very anoying and it always occurs even if we issue a rebuild all with no changes to any file! Is this a known issue and I should just suck it up Is this a know issue and is there a configuration ...Show All
Visual Studio Express Editions Console error
I compiled a simple little program on my upstairs computer and it works great, no problems at all. #include <iostream> using namespace std; int main() { cout << "Hello"; return 0; } I made sure that I checked the "dont use precompiled header" option. The file is 7.5 kb. Now when I run this program on any other computer it doesn't work (I've tried about 6 now). It gets an error message "The system cannot execute the specified program." What did I do wrong divineleft wrote: It's not any of that, it has something to do with the way it is compiled. 1. I followed my instructions exactly, using your program (with Project HelloCout and source code HelloCout.cpp). 2. The p ...Show All
Visual Studio 2008 (Pre-release) streaming image from webcam into a WPF App
Hi, Is there a way to stream images transmitted from a webcam into a WPF App. Is it possible in WPF -Sai If it's a computer-connected webcam, a la USB, you'll probably want to use directShow and renter it into a HwndHost. If you want the content redirected to a wpf surface, your choices are very limited. Either writing a directshow renderer to wpf, and that's no small task (I believe WPF calls down to MIL to hook up directshow output), or blit from memory to a wpf surface, which could end up being very expensive (system to video memory) so unless it's a few frames here and there you're probably better off using an HwndHost. ...Show All
