CantStopGamin's Q&A profile
SQL Server Inserting row with single quote
I'm inserting a row of people's names and addresses to a table. This seems to work great, unless the person has ' in their name, for example O' Riordan. When the address has single quote (such as Wilder's Path), I'd get the same error, unclosed quote when inserting the row. What would be the best way to work around this, other than read the line and replace it with a space. Take a look at these links http://msdn2.microsoft.com/en-us/library/ms378878.aspx http://msdn2.microsoft.com/en-us/library/ms378138.aspx Hope this helps ...Show All
Software Development for Windows Vista An error occurred while enlisting in a distributed transaction.
I am trying to wrap some DB calls in a com transaction for testing purposes (make a bunch of calls to the DB, check if they look right, rollback any changes, move on to next test). So far it works fine running against a local SQL Server, but I can't get it to work against our actual development server. I have tried messing around with the Security area of DTC settings on both my machine and the server, allowed inbound and outbound connections, enabled network, turned off my firewall etc. Of course the only message I get when trying to open an ADO.NET connection against our sql server is: An error occurred while enlisting in a distributed transaction. This exception is being fired on SqlInternalConnection.EnlistNonNullDistrib ...Show All
Visual Studio Team System Red cross on "Work Items" folder
Hi, I just created a second team project on our server. We have a domain group for all developers, so I added that domain group to the Contributors group of the new team project. Everybody from the developers domain group can access the Work Items folder, except one developer who gets a red cross mark on that folder. The same developer has no problems accessing another team project's work items on the same server with the same security setup (developers domain group is a member of the Contibutors group) There are many posts out there about fixing permissions problems for Reports and Documents folders, but not for Work Items. I'd appreciate your help in solving that. Thanks, Leonid Can you a ...Show All
Visual Studio Team System Why is [TestClass]'s constructor called for each [TestMethod]?
Why is [TestClass]'s constructor called for each [TestMethod] I've looked for an explanation, but I probably wasn't asking the right questions. Normally this wouldn't be an issue, but I'm instantiating(sp ) a legacy C++ class via COM from my C# test project in the constructor. After too many instantiations the constructor throws the following exception: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. This needs to be fixed, but in the mean time I was wondering about the multiple constructor calls. As a side note, when I run the tests with the 3rd party VS plug-in TestDriven I don't have multiple constructors called on me. [ http://www.testdriven.net/ ] ...Show All
Visual Basic How to display Non-True Type Font (draft 12 cpi) from Crystal Report in VS.NET 2003
Hi guys! I need your help... I want to use draft font 12 cpi in crystal report and print it to Line printer (Impact printer). I have already changed the font to draft 12 cpi, a non- True Type font, in the report designer but the problem is when I try to use it for printing or when I use the Crystal Report Viewer. The font is reverted to Arial, I think, which is a true type font. My question is how can I use non true type font in Crystal Report and view it to Crystal Report Viewer correctly Do you have any suggestion to fix this problem Thank you Draft font is available for the printer that I used. In fact the font that I used comes from the driver of the printer. I already set the printer t ...Show All
Windows Forms First VB trial and no joy
Hi I have developed a number of ASP applications, and also quite a few Access-VBA apps. I had a need to monitor some Access applications that run unattended, so I decided to take the plunge (from VBA to VB) and to try to write a VB.Net app with VS2005. That proved to be a torturous move, as nothing seems to work, and I am getting nowhere whatever I try. I created a project, added a form, then had to look all over the place to find out how I could simply access my Access DB and launch a SELECT statement on one of the table. But whatever I do, and even before I get to the connection to the Access DB, i ALWAYS get the same error, which tells me absolutely nothing: " A first chance exception of type 'System.ArgumentException' occ ...Show All
Visual C# Convert Windows Application to Windows Service
Hi! I have Multithreaded Windows application having two windows for its GUI. I am trying to convert this Windows Application as it to Windows Service. While Starting windows service it gives me message that "The servcie did not respond to start ot control request in timely fashion". Can anyone help me out regarding this Thanking You in anticipation. Regards, Manish Hi Windows services inherit from the ServiceBaseClass http://msdn2.microsoft.com/en-US/library/system.serviceprocess.servicebase.aspx you need to: Any useful service overrides the OnStart and OnStop methods. For additional functionality, you can override OnPause and OnContinue with specific behavior in response to ch ...Show All
Visual Studio Team System How do you create a Global List?
I understand that there is a way to create custom Global Lists in TFS so that you can use the Global List as a "look-up-table" when creating a Work Item Field. For example, how would you create a global list which contained a list of requirements so that when creating a Work Item, you could have a field called "Corresponding requirement" which would give you a drop down of all of the requirements from the "Global List" to choose from You should be able to find the information you need here: http://msdn2.microsoft.com/en-us/library/ms194977.aspx Hope this helps. ...Show All
Visual Studio Express Editions error LNK2019 related to ConvertStringToBSTR
Hello, I'm trying to do a build on an open source project www.quickfixengine.org and getting some errors. The code is unmodified from when I downloaded it. I just brought it into Visual C++ so this should work. Here's the output: 1>------ Build started: Project: at, Configuration: Debug Win32 ------ 1>Linking... 1>quickfix.lib(MSXML_DOMDocument.obj) : error LNK2019: unresolved external symbol "wchar_t * __stdcall _com_util::ConvertStringToBSTR(char const *)" ( ConvertStringToBSTR@_com_util@@YGPA_WPBD@Z) referenced in function "public: __thiscall _bstr_t::Data_t::Data_t(char const *)" ( 0Data_t@_bstr_t@@QAE@PBD@Z) 1>quickfix.lib(MSXML_DOMDocument.obj) : error LNK2019: unresolved external symbol "char * __stdcall ...Show All
SQL Server Passing parameter to query from main form
I'm creating a report in SQL Server Reproting Services which requires start date and end date as parameters. These date values are keyed in by the user on a form and I need to pass these date values to the query (or dataset) that will use to filter and obtain data from the database. How do I pass the date parameters from a form to the query Let's take for instance that the name of your parameters are StartDate and EndDate. In the query, you reference the parameters by using the @ symbol followed by the parameter name. For example: SELECT DateField , Column1 , Column2 FROM Table ( NoLock ) WHERE DateField BETWEEN @StartDate AND @EndDate Nine times out of ten, the @Variables ...Show All
SQL Server Report Table Group Filter
I try to assign a Group Filter to a table on a report as follow: Expression:=Max(Fields!True_Prescription_Date.Value) Operator:>= Value:=DateAdd("Moth",-6,Today) The report did not work with the following error: An error occured during local report processing. An error has occured during report processing. Failed to evaluate the FilterValue. Any idea Thanks ...Show All
SQL Server showing nulls- UPDATED
Hi All, Ok in an effort to work why the NULL values of my OUTER JOIN are not being shown... I've stripped the query down as best I can The only thing that's a little complicated is the CASE statement to correctly format one of the postcode values from one tbl to the other.. apart from that I can't see why they wouldn't show... Any ideas anyone SELECT ISNULL(COUNT(CASE LEN(REPLACE(dbo.Customers_Trade.PostCode, ' ', '')) WHEN 5 THEN LEFT(REPLACE(dbo.Customers_Trade.PostCode, ' ', ''), 2) WHEN 6 THEN LEFT(REPLACE(dbo.Customers_Trade.PostCode, ' ', ''), 3) ELSE LEFT(REPLACE(dbo.Customers_Trade.PostCode, ' ', ''), 4) END), 0) AS PCCount, dbo.UkPostcodes.Postcode, dbo.UkPostcodes.Town, dbo.UkPostcod ...Show All
SQL Server Help translating Access SQL to T-SQL
Can someone tell me what this Where clause (from MS Access) should be T-SQL Basically, if the value in the [reason] field contains 'DIST' then the row should return as long as the value in [movement] is greater than or equal to 1. Where IIf ( [reason] LIKE '%DIST%' , Val ( [movement] ),1 )>= 1 Thanks! Thanks anomolous! That was the right answer. I just had to change int to real because [movement] holds a decimal value. Yes, Val() in Access converts a string to a number And if it's NULL, Val() will return 0. Will Convert() return a 0 for a NULL value Or do I need to use a different function so that I get a 0 if [movement] holds a NULL value ...Show All
SQL Server Is SQL Server CE really the solution?
Hi, So far, with other programming platforms, I used to have the facility, embedded within application .exe, to: 1- Interface with already existing "multi-user" database (ex: Oracle, Access, etc.) 2- Create/access "local"/"Single-User" files for processing purposes. (try to minimize network trafic...) So far, I've read a lot about SQL Server products (SQL Server, Sql Server Express, SQL Server CE), at least all articles I could find, and would like to have your opinion on what would be the best approach 1- What SQL version to use for "multi-user" databases &n ...Show All
Visual Studio Tools for Office publishing excel values as HTML using VSTO
Hi, I have a C# VSTO application that grabs values from database and display reports in Excel showing market positions and Profit Losss figures. Does VSTO provide any functionality to display some of those calculations as HTML so that these figures can be viewed on company intranet that way not everyone in the company needs to have this excel sheet running all the time..user can simply view relevant figures on HTML. Thanks, Thanks, great..that was easy.. I saved the worksheet as HTML and selected the "Add interactively" option. My Excel worksheet keeps on updating every second or so..its almost real-time...but the published HTML does'nt get updated itself even though I selected publi ...Show All
