simmons's Q&A profile
SQL Server Duplicates
Hi! Grateful for some help as a newbie... I have a OLE db SQL command: SELECT DISTINCT convert (char(8),date,112) as day,...etc Resulting in error "Violation of PRIMARY KEY constraint 'PK_Dim_Date "... so Column Day in Dim_date contains duplicates. I suppose i need a delete in Lookup or how would I eliminate duplicates in Dim DELETE day from dim_date where day in(Select day from date ... This sounds like a transact-sql question, not an SSIS question. But, what is the primary key of the table Dim_date ...Show All
Game Technologies: DirectX, XNA, XACT, etc. D3DERR_NOTAVAILABLE while build of first example in help how to do
I used to code in pascal, cobol, assembly, basic, etc, but not C. From: Your First Game: Microsoft XNA Game Studio Express in 2D following along and doing the first build, I get the error above. I did not think I was calling the 3d engine only the 2d. I cannot find any help on the error, where to look, etc, except what is in the error window when you cursor over it. I cannot figure out how to copy the error in that popup window to look at it further. I know some dislike nubies, but please help if you know the answer. Its disheartening to type in only 6 lines of code and not be able to debug it! To say the least. Thanks OH OH OH, I figured out how to copy the error: Error 1 Building content threw InvalidOperationExcept ...Show All
SQL Server Share calculated members between cubes
Other than copying and pasting the text from the script view, is there any way to share calculated members between cubes I have two cubes that have some common facts, and would like to be able to point both at the same script for calculated members, so that any changes only have to be made in one place. Thanks, Sam It is bit strange. You should be able to use perspectives to hide measures you dont need. In Analysis Services 2005 you should try and consolidate your cubes into the single one, it simplifies modeling, simplifies management. Provides a single source of data for client applications. Edward. -- This posting is provided "AS IS" with no warranties, and confers no right ...Show All
Visual C# ( ), { } and [ ]??
Hi, Can someone please provide a detailed explanation of ( ), { } and [ ] and when each one should be used I have some knowledge of what they mean as I see them used quite often in different parts of the code. Sometimes I see them used in a rather confusing way but because the compilers never complained I had to assume that they were used correctly. Is there a standard for using them Thanks in advance i searched for { } : The codes have used { } to declare an array! like int [ ] array = {1,2,3,4 }; also () is used not just for functions but for constructors too! ...Show All
Visual Studio 2008 (Pre-release) A Service With zero Security
Hi dear I am building a service that will be used over internet and there is no security required. As service requires AtomicTransaction so i have to use wsHttpbindings. and has to configure the WS-AT in MSDTC with certificates i dont know how it authenticates the client but have idea that it might be doing authentication that will be a overhead for the service i want to make it simple and fast and want to remove any kind of security. Regards Please take a look at http://msdn2.microsoft.com/en-us/library/ms729784.aspx for information about configuring WS-AT. Thanks, Michael Green [MSFT] ...Show All
.NET Development Very Basic Question - Sorry
Hi all, I am just installing Microsoft Visual Studio.NET 2005 with SQL serevr. I had a program written in VB.NET with DataBase, when i tried to run it, an error message appeared indicate : [DBNETLIB]ConnectionOpen (Connect()).]SQL Server does not exist or access denied. SQL Server DOES NOT exist ! How come! one thing more, i want to attach a file in SQL server 2005 by the attachement action available there, where can i find it What about Web Server like "Apache" ! it is required, right ! Thanks in advance. Regards. Hi, What did you use as server name I'm not sure of the default instance name but I think its ".\SQLEXPRESS" with the . and \ preceeding the instance name. Also, ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Creating A Game Library (Best Practices?)
I've created a 'Windows Game Library' project to act as a re-usable API on which to build my games. It will contain most the basics... Sprite drawing objects, Line drawing, Bitmap Fonts, Input, etc... The thing I'm running into is how best to give my library layer access to all the important details from the game layer. Properties in the GraphicsComponent and Graphics Device are two good examples. Should I design all my objects to take a "Game" object as a parameter and call back using that Is there a better way What are other people doing Thanks. edit (after a bit more study): The SpaceWars sample passes the game object to each component's constructor if it's a graphical element. That's probably good since the compone ...Show All
SQL Server Receiving Cross Join Result in Error
Hello, I'm getting a cross join result from the following query; SELECT DISTINCT RTRIM ( DA . AcctCode ) AS DaAcctCode , cy . JanRev AS CYJanRev , PY . JanRev AS PYJanRev FROM SalesCommissions . dbo . DailyAccountsDownload DA INNER JOIN SalesReporting . dbo . PriorYearSales PY ON CAST ( RTRIM ( DA . AcctCode ) AS varchar ( 8 )) = RTRIM ( PY . AcctCode ) INNER JOIN SalesReporting . dbo . CurrentYearSales CY ON CAST ( RTRIM ( DA . AcctCode ) AS varchar ( 8 )) = RTRIM ( CY . AcctCode ) WHERE RTRIM ( da . acctcode ) = 'am940' ORDER BY cy . janRev , py . JanRev --************************************************ The result looks like this; DaAcctCode C ...Show All
SQL Server sql connection
I set up a user called "user1" on sqlexpress" I ran an app I wrote that connects to sqlexpress. From one machine I enter...("computername\sqlexpress"). I then enter user1 and password and the connection connections works fine to the server hosting sqlexpress, but on another machine, when I try to login the same whay I get an error "Login failed for user 'computername\Guest'". I can't understand why this is happening. I never set anything up as "Guest". I entered 'computername\sqlexpress' not computername\Guest". Any ideas out there as to what may going on. thanks In your error message does computername show as the name of the computer where ...Show All
Visual Studio Team System Cannot run Team Edition for Database Professionals if not local admin?
Hi there, It's very annoying at our work, but we are not local admins on our machine while logged into the domain. We do have Administrator rights only when we log in as local Administrator to the machine. So when I install the CTP, I execute the setup under the local Admin account, and it installs fine, and runs fine when logged in locally. But, when logged into the domain, it does not show up as an installed product under Help -> About. I do not have this problem with any other product ie I have the BI studio, team edition developer, team edition tester, etc running fine. Any thoughts on how to get the ctp to install and run properly for me Will this work in the future Because if it doesn't we have to go buy a few licenses of ...Show All
SQL Server Parameter defaults not working
Hi, i have some parameter dropdowns in a report, and i have default values for those parameters, but when viewing the report through IE (just as a customer would), the defaults for the dropdowns are not working - in multivalue dropdowns nothing is selected, and in single select dropdowns the value "<Select Value>" is showing. The ParameterValue entries of the parameters consist of MDX style values, so they would look like this: ParameterCaption ParameterValue -------------------------- -------------------------- 1 January 2006 [Sales Date].[Date Description].&[2123] and the rdl looks like this (the first one is single select, the second one multi): <ReportParameter Name=" ...Show All
Visual Basic Panel Opacity?
Is there any way to make a panel have 50% opacity Panel does not have the Opacity property like forms so I do not believe there is a way. You could try asking this question in the Windows Forms group. If there is a way someone over there will know the answer. http://forums.microsoft.com/MSDN/ShowForum.aspx ForumID=8&SiteID=1 ...Show All
Visual Studio Express Editions read/write reg_binary
Hi, I'm hoping somebody may be able to help me out. I'm trying to read/write numbers larger than 255 into registry in reg_binary format (pairs of hex). As an example: I'm trying to write 315 and what I would like to see in registry is 3b 01 (little-endian architecture) but what I end up with is 33 00 31 00 35 00 basically each digit is converted in to byte.... I'm trying to write a plugin, so if I don't write it in the correct format, prog won't understand it... Any samples would be greatly appreciated. Thanks art Glad to hear it! Hans, you could use Marshal.Copy() to copy the memory straight to a byte array, rather than looping through the memory and copying byte for byte. ...Show All
.NET Development Resolution of DateTime.AddSeconds()
The documentation says that the value parameter, which is a number of whole and fractional seconds, is rounded to the nearest tick (100 ns, or 0.0000001 s). However, my experience shows that it is rounded to the nearest millisecond. If you run the following code (C++ 2005, .Net 2.0): DateTime MyDT , NewDT ; __int64 diff ; MyDT = DateTime ( 2006 , 1 , 1 , 1 , 1 , 1 ); NewDT = MyDT . AddSeconds ( 0.1234567 ); diff = NewDT . Ticks - MyDT . Ticks ; Console :: WriteLine ( L "Difference #1: {0}" , diff ); you would see that effect. Is this a bug, a case of incorrect documentation, or am I missing something Kamen If only this were the only instance of wasted time for this exact same reas ...Show All
Visual Studio 2008 (Pre-release) Whats the best way to determine whether or not an Entity already exists in the DB
I'm asking with regards to using Linq to Entities. Lets assume that before I persist an Entity, I want to make sure that it doesn't already exist. I notice there's a GetObjectByKey method, but it throws an exception if the key is not found. Also, I can't do something like... var e = (from c in model.MyEntities where c.Name = "Senkwe" select c); if(e.Count() > 0) //Can't do this because Count() is not yet implemented e.ToSequence().First() // Will throw an exception for an empty sequence (and First() is not even implemented actually) Any workarounds I'm missing Thanks. Senkwe Hi Roger, thanks for the response. Unfortunately, your example is th ...Show All
