Kweri's Q&A profile
.NET Development Windows 2000 Unhandled Exception
I am running an app that connects to an SQL Express DB. I have a public connection variable Public mySqlConnection As System.Data.SqlClient.SqlConnection I then initialise it and connect to the DB like this: Dim DBName As String, DBPwd As String, sConnect As String DBName = "TimeBooking" DBPwd = "xxxx" sConnect = "Data Source=10.130.16.94\SQLExpress;Initial Catalog=TimeBooking;User Id=tb;Password=" & DBPwd & ";" mySqlConnection = New System.Data.SqlClient.SqlConnection(sConnect) This works fine on three machines all win XP Pro but reports an unhandled exception when run on Windows 2000. Two strange things are: 1. The exception SHOULD actually be handled as I have a Try ...Show All
Software Development for Windows Vista Where can I host the runtime in a SOA based environment?
Hello everybody, I am planning to use Listen, Delay and event-based Activities in a sequential workflow like the one in the hands on labs WF HOLD01. In this case the manager can approve the report, otherwise it will be escalated if a certain time-limit is exceeded... Now my question, how and where can I host the runtime if my architecture consists of web services (or respectively wcf in aspnetcompatibility mode) and the workflows take several days So far I hosted the runtime in an Application variable and after each service request I saved the instances through the manualworkflowscheduler service in the database, but now I want to add a LISTEN Activity and inside a DELAY Activity which executes after 3 days, so I must not save th ...Show All
Visual Basic Best place to put application initialisation code
Hiya, I'm trying to get to grips with using a VB2005 splashform. Where's the best place to put in initiliasation code, like loading in XML settings, checking DB connection Is it in the Application OnInitialize function, the splashscreen_Load sub or somewhere else I'm a little concerned in that the splashscreen will close after X number of seconds. How do you ensure that all the initialisation is done before it closes Many thanks John i suggest a simple way is as follow: Form_Load { dim frnNew as new frmSplash frmnew.show if IsAccessWithDB()=true then sleep(X) 'absolutly check access is a long .... else sleep(X) end if frmnew.close } ...Show All
Windows Forms Settings focus after the last character ...
I have a TextBox on a Form. When a user types a character in this TextBox, another Form gets opened displaying records related with that character typed. This second Form also has a TextBox which displays the original character typed in (in the first Form Text Box), and the cursor must wait after the first character so that user may continue typing. How to set the focus after the last character on the TextBox With TextBox1 .Focus() .SelectionLength = .Text.Length End With ...Show All
.NET Development Is there any way to determine if Dispose() was called in the context of an exception?
It would be useful to me if I could determine whether my Dispose() method was called in the context of an exception. Is there any way to find that out Thanks...Rick I am doing this with a using statement. But I want to know if an exception is active when the Dispose method is called. ...Show All
Visual C# [C++ to C#] -> Convert a char* to string
Hi, I've an external library with a function that returns a struct struct in C++: typedef struct{ float pintura; float sustrato; float adherencia; char* codiErrorAdMalla; unsigned char * ImagenM; int alto; int ancho; }DatosAdMalla; I've the equivalent struct in C#: public struct DatosAdMalla{ public float pintura; public float sustrato; public float adherencia; public unsafe char* codiErrorAdMalla; public unsafe byte* ImagenM; public int alto; public int ancho; } First I tried to declare 'string codiErrorAdMalla' but then the function returns me a Pinvoke error!!! Now I want to convert 'unsafe char* codiErrorAdMalla' to 'String' but I don't know how to make it (Sorry for my english!!) ...Show All
Visual C# Modify the account for a Windows Service
Hi, I've been asked to automate the installation of a legacy application. Part of the installation requires calling an existing EXE (not .NET, and no-one has the source code) that installs a service for the application. That all works fine. However, once the service is installed, I need to change the username and password that the service logs on as. Is this possible with .Net I can find no classes/methods that offer this functionality. I've tried to use p/invoke with ChangeServiceConfig from the Win32 API, but am not having much luck. Thanks Mick In fact, a better question to ask would be: Is it possible to change the account details of an existing Windows service through .N ...Show All
Visual C++ C2555 error in VS C++
I received error C2555 when trying to compile my VS 2005 C++ code. I found the following reference and it said under STATUS it has been fixed in Visual C++ .NET version. http://support.microsoft.com/kb/240862/ Should I not be getting this error anymore or am I missing something I am running Microsoft Visual Studio 2005 Version 8.0.50727.42, .Net 2.0.50727, Visual C++ 2005. Ok here is the code. Please let me know if you see what is wrong. I have highlighted the virtual functions in green and the part of the code I think is generating the error, in red. //OptionFactory.h #ifndef OPTIONFACTORY_ #define OPTIONFACTORY_ #include <string> template <class OptionType> class ...Show All
SharePoint Products and Technologies Menu bar
Can someone please show me how to remove the the Embedded Styles section that started with zz1_TopNavigationMenu. It seems to be inserted from some where which i could not figure out, and it overwriting the new styles that I inserted. When i clicked refresh several time, I can see that my new styles are applying, but with in a second it overwritten by the Embedded Styles. I'd look at the AspMenu section in the default but no hope. Many Thanks, Han Duong There are some CSS inheritance issues. If you have applied a theme to your site, these will override your styles too. And the main style sheet for sharepoint would be the core.css, which is always applied the last. There are a couple of ways to do this, ...Show All
Community Chat Creating a new game engine. Anyone want to join me?
I am creating a whole new out of the box idea at a game engine. This engine doesn't use directx at all. Instead it uses the picturebox control. I started making this engine yesterday. How it is going to work is that there is like 50 picture boxes per level, and they are black and blue and tiled so you can see where they start and end and stuff. But anyways, what you do is click on the picture box, and choose your sprite, and you have a tab with a properties and actions tabs, and you could choose what key makes it go up and down, right and left. To assign it a sprite, you simply click on the picture box, and an open file dialog comes up to choose the sprite. I havent added collision stuff yet, but I will. since it is like version -0.0000000 ...Show All
SQL Server Backing Up of Snapshot History
Hi, Is there a way to back up the snapshot history of a specific report I'm thinking on an operations perspective where we need to back up snapshot histories and restore them in case something happens on a production environment. Also, I'm thinking of saving only for specific reports and not for all reports in the same environment/server. Thanks. There isn't a supported way. You can get innovative by archiving tables Snapshot, History, and ChunkData in the ReportServer database (see CopyExecutionSnapshot stored procedure) but a future service pack may break your implementation if the schema changes. ...Show All
Visual Studio Express Editions Select/Open Tree Node
I have two ways of getting to data you can either click on it manually or use the tree of nodes to get to it. I'd like to be able to when I click on something I can have it open and select the correct tree node child. Any ideas I was not able to get this to work correctly. I have a question about what Key is and why it is equal to "NodeKey". I would like to be able to have it select based on either the Node Name or Ideally the Node Tag Thanks ...Show All
Visual C# Convert string to double
, Hi i have a big problem that i can't resolve. I try to develop a program how need information comming from the user by a textbox. This info is supposed to be used a double but textbox give back string. So i need to convert it into double. I have tryed Convert.Todouble( string) but i don't knwo why it doesn't work for negativ number entrered, or decimal number, when i use a coma or a point to enter my decimal number it give back NaN. Please help I've found it a lot easier to rely on databinding to take care of the conversion (eg: http://www.timvw.be/databinding-a-nullable-t-property/ ) As already mentionned, you might want to look into the Culture and UICulture ...Show All
SQL Server Catch Error message in Variable?
Greetings all, When an error occurs it is written to a log file (Assuming you have loggin on). Anyone know of a way to catch the error in a variable When an error occurs I send an email explaining where there error happened and to view the logfile. I would like to include the last error in the email. Saves having to go view the log... Thanks Thiru_ wrote: Hi Jamie, Thanks for your info. Actually I am also looking for this variable. In my case, instead of an 'onError' event handler, I have written 'OnPostExecute'. There I am writing a log file (using a script task) with all job stats like record read, record rejected, etc. I also have to write whether any error occured while executing the package. When I pass the 'Err ...Show All
Visual C# ignore mouse down event
I'm new to C# programming, learning it for pleasure on my own time. As an exercise, I'm creating a simple Windows program that 1) takes the mouse-down event as an 'anchor' point, 2) while dragging the mouse around continually draw a line from that anchor point to the current mouse position, 3) once the mouse-up occurs, shrink the resulting line down automatically until it disappears. Not too hard, and it works perfectly fine. My problem is that I do not want the Form to accept any mouse-down's while the shrinking logic is occurring. Currently, while the line is shrinking, I can do some more click-and-drags, and once the shrinking completes, those subsequent lines are drawn/shrunk in like fashion. I want to effectively ignore any mouse- ...Show All
