John E Katich's Q&A profile
SQL Server Dynamic Connection Strings in SSIS
Possible or not --> I maybe lazy - but I want to achieve just specifiying 1 variable in SSIS package ("environment") - and all the connectionStrings should "poof" magically be adjusted to correct locations In DTS I created a SetDTSenvironmentVariables function for all my packages - so how wouldIi achieve this in SSIS Function SetDTSenvironmentVariables( environment ) Folder = "MyDtsPackageFolder" Select Case environment case "DEV" DTSGlobalVariables("WorkingDirectory").value = "C:\Packages" & Folder case "STAGING" DTSGlobalVariables("WorkingDirectory").value = "D:\Sql_working_directory\My_production\STAGING" & Folder case ...Show All
Windows Forms Autocomplete
I have this function, i try to have an autocomplete function, where when the user types a number it will go to the database and pulls the right Login. I am new and first of all get an overload on the SQL statement. Thank you in advance for your help Al private string GetOptions(string match) { this._retStr = ""; string strConnection; strConnection = "Data Source=source;Initial Catalog=APR;User ID=test;Password=test"; SqlConnection sqlConn = new SqlConnection(); SqlDataReader sqlDr = null; try { SqlCommand sSql = new SqlCommand("SELECT userLogin FROM Admin WHERE userLogin = '", match, ";", sqlConn); sSql.Open(); sqlDr = sSql.ExecuteReader(); } ...Show All
Visual FoxPro VFP Certification Reg.
Hi, I'm working in foxpro for more than 10 years. But most of the time I's working with the DOS version( till 2002). Now I'm learning VFP... I started with 6.0 and now I'm working with 9.0. I'm interested in doing some certifications. Please guide me in this regard. Please let me know the certifications and the formalities to go through. Thanks in advance, Regards, Markish. R Unfortunately MS does not offer Visual FoxPro certifications anymore. Exams were discontinued a few years ago due to lack of interest. ...Show All
Visual Studio Express Editions Burned Express Editions won't install from CD
Hi, my name is Nick, and I'm studying C# and Visual Basic at university. Naturally I required the Express editions of visual studio 2005 in order to run the programs I'm learning. I downloaded the files through the academic link as demonstrated, and then of course one is immediately forced into burning the images onto CD roms (I had Nero installed). Unfortunately then the disk won't autorun. I'm using Windows XP and IE. When I clicked on the setup.exe file on the CD, it did nothing but sit there, as I could see when I checked task manager. When I clicked on it again, I received a message saying that I couldn't run 2 instances at the same time. When I clicked on autorun on the CD, nothing happened either. More interestingly, when I ...Show All
Visual C++ Overriding FindResource() and LoadResource()
I would like to override the Win32 APIs FindResource() and LoadResource() in my C++/MFC app, such that all calls to those APIs (including those buried in MFC) call my versions, and my versions can if they desire pass the call on to the standard versions. The only possible way I can think of doing this is to implement these APIs in my own dll, ensure the .lib for my dll is in the library search path ahead of kernel32.lib (where the standard implementations of these APIs live) and then when I want to call the standard implementations explicitly use LoadLibrary("kernel32.dll") and GetProcAddress(...) to get a pointer to the function. I'd rather not have to supply an extra dll just for this. Is there a better way Mike ...Show All
SQL Server Understanding cube
Hi, I am new to OLAP and was reading on this area on the web. I come across this statement like: "while the relational database (OLTP) updates...the OLAP database will not be updated. " I am not sure of the above statment. In that case the data in OLAP is not the latest and how is it going to be updated Thanks. Regards Alu In other words we have to be selective in the type of reports cater to the customers while certain types of combinations required a relational db to query while others need an OLAP db to use. We can query both dbs on a same application right Regards Alu ...Show All
SQL Server Report Sever . WMI . PathNAme propery
I am not connect to reportserrver by means WMI to read PATHNAME property my code: ConnectionOptions connOptions = new ConnectionOptions (); connOptions.Authentication = AuthenticationLevel .Default; scope = new ManagementScope ( "\\\\<servrername>\\root\\Microsoft\\SqlServer\\ReportServer\\v9\\admin" , connOptions); scope.Connect(); ### exception : Acces Deny; if i write: ConnectionOptions connOptions = new ConnectionOptions (); connOptions.Authentication = AuthenticationLevel .Default; scope = new ManagementScope ( \\\\ <servrername> \\root\\Microsoft\\SqlServer\\ReportServer\\v9 , connOptions); scope.Connect(); // Create the server class. Ob ...Show All
Windows Forms CheckListBox Problem
Hiii i have a checklistbox and a button and i want a code that when pressing the button i want to invert the checked items in the checklistbox ... thats to say if i have a checklistbox with three items .. if checked the 1st and the 3rd items then i pressed the button the 2nd item shuld be checked and the 1st and the 3rd should be unchecked thanx ... Following your requirement, you can never have more than one item checked. Try this code: private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) { if (e.NewValue == CheckState.Checked) { for (int ix = 0; ix < checkedListBox1.Items.Count; ++ix) if (ix != e.Index) checkedListBox1.SetItemChecked(ix, false); } ...Show All
Visual Basic Recieving 'i??' character symbols when loading text files not containing them
I am writing a cross-platform application and I am using Visual Basic 2003 Standard for the Windows XP version of the application. My Windows Mobile version writes information out to a text file and my Windows XP version can load and modify them. The text files do not contain the i symboles, but when I load the text files into my Visual Basic application each file loaded has those symbols attached to the begining of the first line I read into my XP application. Does anyone know why this is happening At first I thought my Windows Mobile Program was the culprit but considering the fact that those symbols are not in the text file when I view them (I used 3 different text editors to make sure) so I am assuming it's something I need to ...Show All
.NET Development dispose method in a correct way
Hi, Please help me with the following questions: 1. What is the difference between the managed resources and unmanaged resources Any examples 2. When i disposing an object, Do I have to set the object to nothing as well For example: Finally cmd.Dispose() cmd = nothing End Try 3. When disposing, do I have to set every instances to nothing For example: string, integer, etc 4. When disposing an object, do I have to check if the object is nothing For example: If not IsNothing(cmd) then cmd.Dispose() End If 4. If I create a new class, Do I need to implement the Dispose method 5. What should I do to properly clean up the resources 6. Sometimes I saw some object might have two ...Show All
Visual Studio Team System Send mail on Build Failure?
Hi, How to send build status mail to team members only on Build Failure Thanks, Visagan. Was about to post this question myself but searched and found this. Answer above was exactly what I was looking for but was not sending out an e-mail. Seemed like the OnBuildBreak was never firing at all. Looked into it some more and found that the Microsoft.TeamFoundation.Build.targets on the build machine had the <OnError ExecuteTargets="OnBuildBreak;" /> in the CoreCompile Target was commented out. I don't remember making the change so have to think that this is the default After uncommenting it and putting the email command in the BeforeOnBuildBreak target to avoid overriding the OnBuild ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Bones and X Importing
Hey all, Took a look around and couldn't find a post about a similar problem on the forum, and just wanted to know if anyone encountered any problems importing an x file that included a skeleton, I created the following test animation (forget the animation at the mo, it doesn't seem to get past the importing stage let alone processing) of a cube in Maya 7, importing it using the directx X importer plugin for maya from the august SDK (the december one crashes everytime i try to use it, and i have yet to try the february one). When i so much as add the x file to my project, without referencing it in the code (so all it goes through is the content X importer and default Model XNA processor) and try to build it returns the error: 'Error 8 Vert ...Show All
Visual C# Weird Inconsistencies
I recently upgraded a multi project solution from 2003 to 2005 and now i'm getting weird and inconsistant behavior on very basic sections of code. In one area I have a decimal, which is equal to 0. I call ToString() on it and get "0.00000" instead of "0" like I ought to. In other sections of the application I get "0", in Snippet Compiler i get "0", and in .NET 1.1 I always get "0". In another area I create a TextWriterTraceListener like "new TextWriterTraceListener(fileName);" which should create a new file. It does work in my sample 2.0 apps, but several places in my big project it just does nothing. No exception, no complaints, just no file. Anyone have any ideas why this is hap ...Show All
Visual Basic Windows Service
Hi! I've implemented a windows service in order to open some excel files and execute a macro . I tried the same code on a Windows Form and it's ok... no problem! But in the WINDOWS SERVICE I've found this error: Error: 0x80028018 (-2147647512) Description: Old Format or Invalid Type Library Dim fileName As String = "c:\TEST.xls" Dim macroName As String = "debugData" Try Dim oApp As New Excel.Application Dim oBooks As Object = oApp.Workbooks.Open(fileName, False ) oApp.Visible = True oApp.UserControl = True oApp.Run(macroName) Catch ex As Exception Me .registroTxt.WriteLine(ex.Message) Me .registroTxt.WriteLine() Me .registroTxt ...Show All
Visual Studio How to move VSS 6.0 db to new server and VSS 2005?
I may be making this harder than it needs to be, but I need to migrate an old VSS 6.0 db to a new VSS 2005 db that's on a new server. I'm somewhat of a novice and really having a difficult time figuring out how to do this, even after reading Help docs and forums. Do I need to upgrade the VSS 6.0 install to 2005 before I can migrate Is there an easy way to "move" or "import" the old db info/history to the new server location TIA. Skugga The VSS 2005 installer is not really an upgrade -- it installs the new version of VSS side-by-side. The DB format is essentially the same; VSS 2005 clients should be able to connect to the old database immediately. (I wouldn't recommend running 2005 ...Show All
