Guy Pilk's Q&A profile
.NET Development DataTable.ReadXml(filename) throws an error. Why?
Visual Basic 2005 running on .NET 2.0 happily reads an XML file into a DataSet, but throws an error when asked to read it into a DataTable, in spite of the ReadXml() documentation which suggests that the DataTable operation is also supported. Test.xml is of this form: < xml version="1.0" encoding="ISO-8859-1" > <fruits> <fruit> <name>apple</name> <color>red</color> <texture>crunchy</texture> </fruit> <fruit> <name>orange</name> <color>orange</color> <texture>juicy</texture> </fruit> <fruits> The code: Dim fn As String = "C:\Test.xml" Dim dts As New DataSet ...Show All
.NET Development bug on the registry function
Hello, A program is reading some value in the registry to apply some configuration. When reading the registry in sequence for several keys, there is about 2% chance that the read will fail and return an empty string on some machine. This program was in C and upgraded to VB.net. It is run with the framework 1.1. The program always worked well in C, the bug appeared with VB.NET. I have made an application to make a stress test to the registry. Begin //Each time you make a read, you open the key, get the value and then close the key. loop from 1 to 100 var1 = readRegistryKey var2 = readRegistryKey var3 = readRegistryKey var4 = readRegistryKey var5 = readRegistryKey var6 = readRegistryKey var7 = readRegistryKey var8 = readRegistry ...Show All
SQL Server Test\Prod databases on same server; same SSIS algorithm but different connection strings needed
We have an SSIS package that will be used for both our Test and Prod imports on the same server. The SSIS imports are identical expect that Test needs all connections pointing to the Test database while Prod need its connections pointing to the Prod database. How can I change the connections, based on Test or Prod, used inside a single SSIS package (I don't want to create two tweaked packages on the same server. If I find a bug in one of them, I have to correct it twice.) TIA, barkingdog For #1: To change the Server Name - You will have to modify only "Data Source" property value only. For #2: Yes - the location much be same on the other server also. Incase you want to have t ...Show All
Visual Studio 2008 (Pre-release) Problem getting IIS Hosted service to accept id and pw
I set my client code (located on a remote client) to contain the username and password to the username and password used to log onto the service (Is that correct ) I get an error when I have the client call the service. (I tried reading the chapter referenced in a previous note, but it is a little above my head). Below is the error I get from my client: Unhandled Exception: System.ServiceModel.ServiceActivationException: The request ed service, 'http://10.14.1.50/JOHN1/service.svc' could not be activated. See th e server's diagnostic trace logs for more information. Server stack trace: at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(Tim eSpan timeout) at System.ServiceModel.Security.SspiNegotiationTo ...Show All
Visual C# Operator '+' cannot be applied to operands of type 'T' and 'T'
One day, the Microsoft C# team will stop treat us as kids, and this code will become possible: public static ABIDataVoidNull<T> op_Addition_NV_NV<T>(ABIDataVoidNull<T> inValueL, ABIDataVoidNull<T> inValueR) { if (inValueL.IsVoid) { return (ABIDataVoidNull<T>)inValueR; } else if (inValueR.IsVoid) ...Show All
SQL Server Multilingual report ?
Hi ! Is it possible to create multilingual report. What i mean is when i create an ASP.NET page i can add as many resource file as i have different language on my website. This will change all the texte on my pages to be in the language that the user have select. So i have just one page for 4 diffrentes languages. So i would like to know if it's possible to do something like that. I mean i don't want to do 4 reports if i have 4 differents users languages. Currently we need over 300 reports. So i don't want to have to do 1200 reports. It seems a little bit crazy lol Thanks ! Sorry about my bad English ^_^ What i have done is that i've created a Class and compiled it into a dll. When you have your dll you ...Show All
Visual Studio Team System CTP6 - I am stumped!
I've installed CTP6 and am attempting to create a 2005 Project. Can someone tell me what I should enter in the - Tools | Options | Data Connections page in the SQL Server Instance Name field - Tools | Options | Design-time Validation database page in the SQL Server Instance Name field No matter what I try entering in those fields, I get errors attempting to create a project. I have a local instance of SQL Server 2005 named 'SQLServer2005' I would like to be used. When I connect to this instance via Management Studio, I enter 'localhost\SQLServer2005' as the server name. I've tried all sorts of permutations in those two fields but nothing seems to work. Thanks - Amos. ...Show All
Windows Forms Dataview
A question please. Can a dataview select the columns of a Datatable For rows is: mydataview.RowFilter = "field=" & cboSujet.SelectedValue.ToString but for columns Thanks... Well I could find the ToTable() method which has a few overloads. One of which will (or should) return you back the column names you want to be included.... 'after you apply the rowfilter.... Dim results as new DataTable = theDataView.ToTable(false, new string() {" ColumnName1 ", " ColumnName2 "}) this will return back, after you apply the row filter, columnname1 and columname2 - of course replace the column names appropriately does this work ...Show All
SQL Server Help Merge Replication
Hi to all, I'm writing an application with Comact Framework 2.0 and I'd like to use merge replication to synchronize data among the sever and 25 Pocket PC. The DataBase contains static tables (for configuration) and dynamic tables that I want to publish. Configuration tables are small so no problem to publish them. The problem is with dynamic table and that's my first question: One of these dynamic tables contains 150,000 records and data inside it (I can't use filter because all data must be "seen" to all POcket PC) should be published on each Pocket PC so: Is it possible to use merge replication with such big table Or is there another method to treat this kind of problem Should I use merge replication only for ...Show All
Visual C# About solution folder - A bug or not?
Solution folder's bug or not I tried VS2005 visual C#, I found a problem that I can't solve: After create a new windows Application project, then create Solution Folder, in the solution folder I create new windows user control library, after build, I can find the User Control in toolbox. I don't know why I've tried if I didn't put the User Control library in Solution folder, then the user control listed in toolbox. In vs2005 beta2, no this problem, I don't know if it's a bug for vs2005 If someone know the answer, please tell me it. Thanks and regards, Tiger.xing Mark, That effectively neutralises the whole usefulness of solution folders for me. Any chance you could at least elaborate on why this had to be ...Show All
SQL Server grouping and summing
I need help in summing a column by dates in the format of "YYMMDD". We have multiple orders of the same product each day. I am importing this table to Excel and creating a dashboard. My ultimate goal is to reduce the size of the imported table and still have daily totals of each product. We run thousands of line orders per class which really bogs down Excel. My table in MS Query is as follows (the actual table contains approximately 8,000 lines per month): date prod class qty 060101 a101 1a 100 060101 a101 1a 100 I would like to have the following: date prod class qty 060101 a101 1a 200 Any other suggestions would be greatful!! Thanks in advance the query to ret ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Best way to learn
What is going to be the best way to learn XNA I have to say I am not used to "new" technologies. My experience comes from looking up tutorials and then following them and expanding off of them. However, with XNA this is brand new and I hope to be create the tools. Here in lies(sp ) problem I have no idea how to learn something without an abundance of tutorials. XNA has gotten me real excited and I can't wait to get my hands on it and maybe become one of the first people to really adobt and get into the XNA community. Any help would be greatly appreciated. Thank you, Buddy Lindsey Since there won't be a lot of tutorials out there this soon -- the best way to learn will probabily be via the demos like Space Wars that are goi ...Show All
Visual Studio Express Editions CM_Request_DEvice_Eject in windows XP is not working in my application.
Hi all, I am developing a USB application, in which i am registering the Device_Arrival notification.I am using CM_Request_Device_Eject to reject the USB Mass Storage Device. For this i am using setupapi.h and cfgmgr32.h header files from setupapi.dll. this is the code snippet: TO REGISTER THE EVENTS: HDEVNOTIFY hDevNotify; DEV_BROADCAST_DEVICEINTERFACE NotificationFilter; ZeroMemory(&NotificationFilter, sizeof(NotificationFilter)); NotificationFilter.dbcc_size=sizeof(DEV_BROADCAST_DEVICEINTERFACE); NotificationFilter.dbcc_devicetype =DBT_DEVTYP_DEVICEINTERFACE; HDEVINFO hDevInfo; NotificationFilter.dbcc_classguid =GUID_CLASS_USB_DEVICE;//GUID_DEVINTERFACE_USB_DEVICE; //GUID_DEVINTERFACE_LIST[0];//GUID_CLA ...Show All
Audio and Video Development Preventing a focus sound from playing on start
Any ideas on a slick way to prevent the focus sound from playing on start when you have a button that starts with the focus I'm managing focus sound like so: <g id="ButtonFocus"> <set style:backgroundFrame="1" /> <event name="PlayFocusSound" /> </g> function playFocusSound() { Player.audio.effect.play('file:///dvddisc/ADV_OBJ/main.aca/focus.wav', 1, function focusSoundCallback(status){}); } Several ways... Make your event handler ignore the first event after every markup page load Put the cue that calls ButtonFocus inside a parent container that has a begin of (eg) 1s so that it won't fire immediately Create an alternate ButtonFocusNoSound animation, and use a ...Show All
Windows Forms Parameters for iexplore.exe
Hi, I have a .Net application that opens the browser when a certain action is done. This is done by Process.Start("www.google.be") for example. Now I want that there is only one browser window for the application. When I click on a link in my program, the link must open in a existing window from that program if exist. I have googled to find the iexplore.exe parameters but only find -k for kiosk mode and some others like -new, -embedded, -nohome... Someone have a link or the list for the parameters Thx Good example , but it is not exactly what I am searching. Maybe my question was bad formed... The program gets every minute a list of new objects on the server (alerts). These are visible through ...Show All
