Cordell Swannack's Q&A profile
.NET Development CreateParameter give bad performance
We are working with MSSQL 2005 and ado.net framework 1 .1 During our performance tests over large DB (~1M records) I found out that when I run one of our queries, with embeded values in the query -string, instead of using the CreateParametr method, the query ran 40 times faster!!! The parameters are 2 strings (~30 characters) , the type in database is varchar(255). Wh at can cause such a huge difference in the execution time This is our AddParameter source: public void AddParameter( object parameterValue) { string paramName; IDataParameter IParam; //For string that is empty do nothing means null is entered to field. if (((parameterValue is string ) && (parameterValue.ToString( ...Show All
Software Development for Windows Vista Errors in winnt.h file using visual c++ 2005 express edition and mar. 15 sdk
Hello. I get the following errors when I try to include winnt.h in my code. I tried using the newest sdk as well as the previous release, and both files seem to generate the same errors. This must be a common problem, but I haven't seen the answer. I'm including stdio.h, xlcall.h, windef.h and winnt.h in my code. Maybe I need to include another header. Any help would be greatly appreciated. Thanks. C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winnt.h(3857) : error C2146: syntax error : missing ';' before identifier 'ContextRecord' C:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\Include\winnt.h(3857) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-in ...Show All
Visual C++ Building 3rd Party Libraries - cl.exe and link.exe errors
I'm having difficulty trying to build a dll from source provided by a 3rd party. The source is actually free and can be found at http://librsync.sourceforge.net/ I am trying to build the librsync library in Visual Studio 2005. If you download the above source, after extract the code, you will see a folder labeled PCBuild. I migrated the VS6 project to VS2005 and get the two common errors... Error spawning 'cl.exe' and Error spawning 'link.exe'. If I add the appropriate folders in the executable paths, it then gives me the Error result -1073741515 returned from 'C:\Program Files\Microsoft Visual Studio 8\VC\bin\cl.exe'. error. Can anyone offer any assistance with this Any idea what I am doing wrong Thanks for your assistance! ...Show All
Visual C# C# Hashtable Issue
I'm adding key-values to my hashtable (company_data), but everytime I add something new, it adds it to the element from which the hashtable was derived, Universe[ i ]. Universe is just an arraylist of hastables that is declared as a member of the class. Its creating a reference i'm guessing to the original element instead of copying just the actual values. How do I fix this for(int i=0; i<Convert.ToInt32(Universe.Count*0.1); i++) { Hashtable company_data = new Hashtable(); company_data = (Hashtable)Universe[ i ]; Hashtable dm = report.DownloadMnemonics_pri(); foreach(string key in dm.Keys) { company_data.Add(key,GetFactSetData(company_data["ticker"].ToString ...Show All
Windows Forms Update a form
I have the main form Form1 and I start Form2 to add an item to Form1. How can I update Form1 when I have selected the item. This is exactly what I’m doing. I have the following in form 1 public Form1() { InitializeComponent(); this .AddCheckBoxes(); } public void AddCheckBoxes() { XmlReader reader = XmlReader .Create( "c:\\Words.xml" ); int x = 0; while (reader.Read()) { while (reader.MoveToNextAttribute()) { if (reader.get_Name().equals( "language" )) { System .Windows.Forms. CheckBox NewCheckBox = new System .Windows.Forms. CheckBox (); NewCheckBox.set_Location( new System .Drawing. Point (13, 13 + x)); ...Show All
SQL Server Connection problems
Hi, I am trying to connect to a simple cube in SQLAS2005 from a Webpart "SQL Server 2005 analysis filter" in SharePoint 2007. I have entered a reference to the cube in the sharepoint connection library, but when I try to configure the filter webpart, just before selecting dimension and hierarchy, I get the following error: The connection either timed out or was lost The inner error from the sharepoint logs show this: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host I have tried to give permissions to both myself and the sharepoint server as admin in both the sql server 2005 and created an admin role in the analysis server 2005. The firewall is turned off. Nothing wor ...Show All
Visual Studio Team System Transition rules clarifying
Hi. Could you please help me I am customizing task workitem now and, for example, I need the transition from Closed to Active state with reason “Reactivated” to be made only by ProjectManagers group and with all the other reasons by anyone. How should I specify the rules I am sorry say that ability to edit field values based on groups is not available in v1 so what you want to do is not possible at this time. Thanks, Mohammad ...Show All
Visual Studio Express Editions how do i select a form as a startup object when....
when i add a new project (project->add new project) then selecting a startup object is easy...(by right click on the project in the solution bar) but when we ADD NEW ITEM to a existinfg project the i don;t get any option to select that form as a startup object In VB you can click on "My Project" and under the "Application" tab you can select your "Startup form" In C# you will need to update Program.cs to call your new Form by modifying the line: Application .Run( new Form1 ()); ...Show All
SQL Server SQL Server 2005 Express:Is it possible to convert existing data from .mdb to .mdf?
Hi all, I need to use the SQLDataSource in Visual Web Developer (VWD) 2005 Express websites. The SQLDataSource must have the .mdf data in the project application. But I have a volume of the .mdb data for evaluation by using T-SQL of the SQL Server 2005 Express and VWD 2005 Express program. Is it possible to convert existing data from .mdb to .mdf If it is possible, please tell me what software program to use and how to do it. Thanks, Scott Chang OK, sure. Depending on your Access version, Access has a Upsizing Assistent which can help your to export the data to the SQL Server. Another option would be to right click the database in the Express Manager > Tasks > Import data. HTH, Jens K. Suessmeyer. --- http://ww ...Show All
SQL Server Newbie - sa password error after ACT! install - Need pro's help!!!
Hello, I am admittedly new to this, especially sql server and am in need of a pro's assistance.. I installed Microsoft Small Business accounting, which in turn installed and configured a sql server. When I installed ACT! 2005 (v7.0) and tried to create a database, it states that it cannot find the master file.... so I tried to install sql server from Microsofts site - downloaded all the packages, unzipped them and ran them... the error I get is that the sql server needs to have an sa password and to use some switch to change it... for the life of me I am lost here. I can't use ACT! at this point and I have not ideas of how to remove, reinstall or repair the sql server.... Any help you can provide would be greatly appreicated! The defa ...Show All
Software Development for Windows Vista Install of the SDK fails(setup will not start).
When I try to run the setup.exe nothing happens. Not setup will start. Any ideas what goes wrong OS: XP SP2 with IE7 Now it is fixed For all with the same symptom: I have run an repair installation of .Net 3.0, because the repair installation of VS C++ 2005 Express has broken .Net 2.0 and 3.0. ...Show All
.NET Development Check how many references there are to an object
Hi! I am writing a .NET Compact Framework application, which loads a certain number of controls in a row and displays them to the user (first control A gets loaded and displayed full screen, then control A is replaced with control B, B is replaced with C and so on, but only one control is loaded at a time and each control will also be used only one time). Writing this application for a memory constrained environment (Pocket PC) I added a finalizer to a few controls to see if they got disposed properly, yet they didn't. So I wonder if there is a way to track the number of references to an object so that I can find out what keeps these controls from being collected. One thing to note is that although you have added a finalizer to a cont ...Show All
Visual C++ fatal error C1902: Program database manager mismatch; please check your installation
Hi, I am having trouble getting my MSVC Express 2005 / Platform SDK environment (downloaded from Microsoft about two weeks ago) so that it can compile debug binaries. If I don't give cl the -Zi option, I can compile and link correctly, but with -Zi, I get the following: $ /cygdrive/e/users/cmiss/physiome_builds/trees/xpcellml_api/cygwin-wrapper cl -c -Zi -DXP_WIN32 -DXP_WIN -DWIN32 -D_WIN32 -DNO_X11 -EHsc -TP -nologo -MD -D__WIN32__ -DXP_WIN -DXP_WIN32 -D__x86__ -I/cygdrive/e/users/cmiss/physiome_builds/trees/mozilla_trunk/obj-i686-pc-cygwin/stablexr/dist/include/xpcom/ -I/cygdrive/e/users/cmiss/physiome_builds/trees/mozilla_trunk/obj-i686-pc-cygwin/stablexr/dist/include/nspr/ -I/cygdrive/e/users/cmiss/physiome_builds/trees/mozilla_trunk/o ...Show All
Visual Studio Team System Linking to a work item inside team explorer
I need to create a link that when clicked, will bring up a specific work item inside Team Explorer. I'd like this to happen whether or not Visual Studio is running. I've done a little bit of preliminary work, and it seems feasible with the VSIP linking code. Can anyone provide insight Is this do-able Thanks, Jonathan Cran jcran@iastate.edu Are you talking about having a web url, clicking on which opens VS TE and shows a specific workitem We do not have protocol handler for this yet and is not possible in V1. You can open a query though by giving a path to a ".wiq" file. There is no equivalent for workitem like wiq file in V1. One option is to create a wiq file with a query that says "id = <id-number ...Show All
Visual C# How can we read the properties of song selected from the fileupload control
Hi, i will upload one song from fileupload control at this time i would like to read the advanced properties of selected song, advanced properties like Album, Author, Title, Duration etc., of the selected song. How to do this Thanks Vishwanath hi vishwanatha, u may try this: Dim id As ID3V1Tag // this for mp3 //Dim w as WMAID3Tag // this for wma //w = New WMAID3Tag(tbFilename.Text) id = New ID3V1Tag(tbFilename.Text) tbTitle.Text = id.title tbArtist.Text = id.artist tbAlbum.Text = id.album tbGenre.Text = id.genre tbYear.Text = id.year.ToString tbTrack.Text = id.track.ToString tbDescription.Text = id.comment hope this can help you...:) ...Show All
