pkrug's Q&A profile
SQL Server Handling errors in SSIS
When I have an alternet Data Flow in an event handler, caused by a record failing to be inserted due to a unique-key constraint violation, does this increment the number of errors, counting towards the MaximumErrorCount How can I NOT count it as an error The thing is, I need to insert 300,000+ records each day, and some may be duplicates from data already in the table. So I set a unique key constraint on the table, and if during the load, it fails, it will trigger an alernate data flow to load the error records into another table. But if someone tries to load a file that already has been loaded, for example, all the records would be duplicates, which would be equivelant to 300,000+ errors, and I don't want to keep setting the MaximumEr ...Show All
Visual Basic Check for encrypted match.
Have reposted as I have an idea what is wrong, below is the encryption routine that I am using, my problem is that every time text is encrypted it uses a different Key. So how do I use the same key so that when the scrambled password on file, is compared to the scrambled password entered they will match Function encryptStringToBytes_AES(ByVal plainText As String, ByVal Key() As Byte, ByVal IV() As Byte) As Byte() ' Check arguments. If Key Is Nothing OrElse Key.Length <= 0 Then Throw New ArgumentNullException("Key") End If If IV Is Nothing OrElse IV.Length <= 0 Then Throw New ArgumentNullException("Key") End If ' Declare the streams used ' to encrypt to an in memory ' ar ...Show All
Visual Studio Team System Publishing Load test results
simple question: when I select the Publish Test Results button in the test results window, I receive a message saying: "The current team project does not a have any build. A build is required in order to publish test results" While I understand the statement, I have no idea what to do. Please advise. thanks For the current version of the product, there is no way to publish results if you don't have a build; and that is why you must create a build if you don't have one. The build may or may not contain a solution with test(s). If it does, then it will run the tests and create the build only if the tests pass. But it won't affect your solution or any other solutions associated with th ...Show All
.NET Development syntax error- insert into statement!!!
have a problem on this code.... dim sql as string = "Insert into table1(column1, column2) select column1, column2 from table2" com = New OleDbCommand(sql, con) im using VB 2005 and Access as my databse. i test my insert statement in MS access, and successfully append record... but when i placed it in vb net, it state that "syntax error in insert into statement"... con = New OleDbConnection con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\finance\TiTo.mdb;Jet OLEDB:Database Password=nixtro" con.Open() sql = "Insert into hrd_T_TITOAdjustment(employeenumber, Firstname, LastName, MiddleName, logdate, Day, timein, timeout, halfda ...Show All
Windows Forms Checkbox in a Combobox
Hi All, Is there a way to have a combobox dropdowns a list which has a checkbox for selecting multi-items Thanks See this project: A checkbox-bitmapped combobox and this http://www.vbcodemagician.dk/tips/wincontrol_checkcombo.htm ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Stereoscopic vision and XNA
We have a stereoscopic projection system at work which uses two projectors with polarized filters and relies on twin video streams with slightly different camera positions. Has anyone any ideas if / how I can open two windows in XNA with different camera positions on the same scene Or generate two separate camera views in parallel in one window Any suggestions gratefully received! Your suggestion of twin viewports worked great. The only problem is that the display rate really slows down when I span the monitors.I'm assuming that this is due to the software having to swap between graphics devices, so it looks like I'll have to open a window for each device, or get a faster graphics card :) ...Show All
SQL Server ParallelPeriod over a set?
Classic multi-select problem. I am trying to display the delta between visits to our clinic for the current timeframe versus the same timeframe last year. Pretty straightforward application of ParallelPeriod. The following query works just fine: WITH MEMBER [Measures].[Test] AS '[Measures].[Visits] - (ParallelPeriod([Time].[Visit Date].[Year], 1), [Measures].[Visits])' select {[Test], [Visits]} on columns from [Clinic] where ([February 2006]) However, change the where clause to include a set rather than a member... WITH MEMBER [Measures].[Test] AS '[Measures].[Visits] - (ParallelPeriod([Time].[Visit Date].[Year], 1), [Measures].[Visits])' select {[Test], [Visits]} on columns from [Clinic] where ({[February 2006], [Marc ...Show All
Visual Basic Combobox Dropdown
Hi, I created a form with a datagridview - frmLookup. I'd like to display the frmLookup from the dropdown in a combobox. Everything works fine but I can't stop the combobox dropdownlist from actually displaying, once the frmLookup is closed. Thanks, Camille That did not seem to help either. I am trying to create a multi-column combo box in the vb.Net environment. I am calling a datagridview from the dropdown event. Like I said, this all works fine except I can't keep the drowdownlist from displaying. Any other suggestions ...Show All
Visual C# Cannot implicitly convert 'type' to 'type' error
Code: string processName = processTextbox.Text; Process a = new Process(); a =System.Diagnostics.Process.GetProcessesByName(processName); a.Kill(); It returns this error: Error 1 Cannot implicitly convert type 'System.Diagnostics.Process[]' to 'System.Diagnostics.Process' C:\Documents and Settings\Deru\Mina dokument\Visual Studio 2005\Projects\ProcessKiller1\ProcessKiller1\Form1.cs 30 21 ProcessKiller1 And the help(F1) doesn't help me out too mutch, It says it's trying to convert a type into a type... Now I get this: Error 1 Syntax error, bad array declarator. To declare a managed array the rank specifier precedes the variable's identifier. To declare a fixed size buffer field, use the fixed keywo ...Show All
SQL Server How do you search for textvalues with wildcards in xml?
What I want to do is search for a text string inside a xml tag using my own wildcards. For example: The following xml is stored in a column in the database. < MetaData > < MetaFields > < MetaField Id = " 20 " Key = " x " > erwrw </ MetaField > < MetaField Id = " 23 " Key = " x " > Foxvalue </ MetaField > < MetaField Id = " 24 " Key = " x " > adsas </ MetaField> < MetaField Id = " 25 " Key = " x " > Varde1 </ MetaField > </ MetaFields > </ MetaData > How can I search the xml to see if any of the /MetaData/MetaFields/MetaField values contains Fox* In xquery there is ...Show All
Visual Studio Express Editions Howto get rid of the colored box around a placeholder in an inserted snippet
Hi! Sorry for the really dummy question, but it starts driving me mad:) So, I insert a code snippet in Visual Basic 2005 Express, in which there are placeholders, where the snippet should be changed. These are marked with a box around them with green background. I change the the text in them, but the coloured box wont disappear from it. If I hit Enter (as it works in C#), it just adds a new line, but the box remains. I tried Space, and Tab, but no luck:) thanks for the help! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. how to detect the coordinate of mouse cursor
How to detect the coordinate(x, y) of the mouse cursor. One of the example in DirectX Sample Browser "Cusstom Format" under DirectInput category got teach this, but the program got bug, I was point the cursor to a position, then i move the cursor around and point it back to same position, the coordinate will be different. I was tried to modify the program, and set the cursor to centre when the program run, but the coordinate still different when I move the cursor to same position. Thanks. The easiest way probably is to use the Win32 API GetCursorPos() function which will return the screen coordinates of your mouse pointer. Use ScreentToClient() to map these coordinates to the client coordinates of your window before using t ...Show All
Visual C++ Application to send Windows messages
I'm looking for a program that would allow me to send Windows messages to Windows in general and to specific windows. Say that I want to send WM_LMOUSEBUTTON and see how that affects a window. Is there such an application or will I have to write my own What I actually want is a reverse Spy++ :) I want to be able to synthesize and send messages instead of listening for them. If this mean building a custom app, then be it. I'd rather use an existing one though. ...Show All
Visual Basic Preserve on Commit
I want to process recordset and do periodic commits without losing the cursor. I'm trying to use the "Preserve on Commit" property but I'm getting this msg: ERROR DESCRIPTION: Item cannot be found in the collection corresponding to the requested name or ordinal . Any ideas, anybody, anywhere ------------------------------------------------------------------ Global cnConnect As ADODB.Connection Set cnOracle = New ADODB.Connection strConnection = "DRIVER={Microsoft ODBC for Oracle};" _ & "UID=" & strUserID & ";" _ & "PWD=" & strPassword & ";" _ & "SERVER=" & strDatabase & ";" cnO ...Show All
SQL Server return the last 10 dates from a table
Hi all, I am trying to create to a store procedure that manages to return the last 10 dates from a table i know there is a TOP keyword that return the first rows but is there a keyword that returns the last rows instead Matt Hi Matt, You use TOP for this as well, but you order DESCending: select top 10 crdate from sysobjects order by crdate DESC Cheers, Rob ...Show All
