soconne's Q&A profile
.NET Development You need to add XmlChoiceIdentifierAttribute to the 'EvalDate' member.
Hello, I am trying to make a custom XMLserializer for my class. wrote a simple writeXML method for my class and it works. My class has int members. However, when I add a member of type datetime, the writeXML doesn't work anymore! This is the sort of an error i get: System.InvalidOperationException: There was an error reflecting property 'datetime member'. ---> System.InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'datetime member' member. here is my code for writeXML: public void WriteXml(String filePath) { StreamWriter stWriter = null; XmlSerializer xmlSerializer; xmlSerializer = new XmlSerializer(this.GetType()); stWriter = new StreamWriter(filePath); System.Xml.Serialization.XmlSerializerNamespac ...Show All
Visual FoxPro How to create a Word document?
I wish to convert a memo field into a Word format document. I searched around and found this: oWord=CreateObject("word.application") oWord.Documents.Open("c:\test.doc") oWord.ActiveDocument.Range.Start=0 oword.ActiveDocument.Range.End=0 oWord.ActiveDocument.Range.Text="XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" oWord.Documents.Save() It works if the test.doc is already there. How do I create the file using VFP code because the file name should be created by the user himself. Thanks. Try this code: oWord=CreateObject("word.application") oWord.Documents.Add oWord.ActiveDocument.Range.Start=0 oword.ActiveDocument.Range.End=0 ...Show All
Visual Studio Cant find the class for embedded crystal reports?
Hi guys. I'm having a problem finding the class for the embedded crystal report document I've added to my project. I am using VB.Net 2003 and based from the information I've got from MSDN, once you embed a crystal report into your application, a class will be automatically created for you to use to instantiate the report in your code then bind it to a crystal report viewer. But i cant find that class Say for example, ive embeded crystal report document named "CRSample.rpt" to my application. My crystal report viewer is named for example "CRVSample". I want to do it like this. Dim CRSample as ReportDocument CRSample = New [This is where the problem is. The class CRSample is suppose to be listed here after hittin ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How to render alpha blended textures on a Model?
I have a 3D model with a texture applied that contains alpha information to make parts of it transparent. How do I go about rendering the model with the transparency I've figured out how to render the entire model translucent but not how to make a specific material on the model translucent in accordance with the alpha values of the texture used by the specific material. Is there a way to do this Given that the texture you are using does in fact have an alpha channel, the key here is to setup the blending render states properly depending on what you are trying to do. Additive blending will make parts of the texture that are set to opaque (having an alpha value of 1.0) appear to be translucent, so I assume you are probably going fo ...Show All
SQL Server Executing MDX StoredProcedures using AdomdClient.dll
Hi fellow developers, At the moment, i have a SSAS 2005 installed and a working cube on it. Everything is working fine. However i want to have an ASP.NET Page to access some of the data in the cube and present it. Well this would be no problem at all, if i use the AdomdClient and send queries over it, but this destroy my layer architecture. I dont want any Queries in my Application, but in the SQL Server. When i used a sql server database i always used stored procedures to access the data because of security and consistence. Now is there a possible way to create MDX Stored Procedures and execute them with the Adomd API like i did with sql server databases Or other clean solutions like creating mdx libraries on server and acc ...Show All
SharePoint Products and Technologies Problems with replication of Active Directory password change to Sharepoint 2003
Hi, we have a problem when some users change their password Sharepoint 2003 does not replicate the password from Active Directory. And the username/password dialogbox comes up. Is there a workaround for this problem Anyone else have the same problem This is the case for around 10 users now. And the only way to make sharepoint is setting the password back to the old password. Appreciate help! Thanks, Kjetil Tveit Hi Kjetil, Are you using SPS2003 or WSS 2.0 (with AD auto creation mode ). If you are running the portal in the same domain as the user, has the user logged out and in again on their local PC Maybe there is a mismatch with the current logged in user on the PC (old password), the integrated windows authent ...Show All
Visual Studio Team System Sharepoint Portal Error 2003 Urgent!!!!!
Dear all, I need help. My company Sharepoint portal have some problems. When I upload any docs, it show below: "Form Validation Error Please correct the information you provided by following these steps, then submit the information again: Web server is busy. Please try again." What can I do ....Pls help Thanks Cheers Tataime Did you ever get this resolved. I am receiving the same error and have tried all the suggestions but still receive the error. I moved the databases so there is plenty of space now. It is not a file naming issue. Any help would be greatly appreciated. ...Show All
Visual Studio Express Editions syntax code
to those of you who are familiar with the coding, could you write a simple code example so we can understand,give us simple syntax examples please of; deleete command accept changes command that way those of us who are beginners can read the syntax and get a better view of how it works. We are trying our best to help but apologies if you are feeling you are not getting any where. Starting off with something new is hard, always, but you must never be beaten by the challange :-) The way I had created my version here, was to drag a binding source on the form, and bind it to a database table, then I was able to access the table adapters in code and able to get the delete command. The delete ...Show All
Visual Studio Express Editions Different Coloured Brushes
How do I change the brush colour so that each square is different I was thinking of using an array, Dim arrCol() As String = {"Red", "Yellow", "Green"} but string can't be converted to system.brush. I tried Dim arrCol as System.Brushes, but that doesn't work either. So any ideas please. Here's the code, Dim B1 As New Bitmap(146, 92) Dim G1 As Graphics = Graphics.FromImage(B1) Dim PB As New PictureBox Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim X, Y, W, i As Integer X = 0 Y = 0 W = 128 For i = 1 To 40 G1.FillRectangle(Brushes.Blue, X, Y, 16, 16) X += 18 If X > W Then X = 0 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Pixel Perfect Collision
Anyone know of any good resources for learning how to do pixel perfect collision on sprites which takes rotation and scaling into account Gunston wrote: Parlance Whether pixel perfect or bounding hull or simple hitbox collision detection is "useful" depends entirely on the game you're implementing. I'm a fan of Japanese 2D shooters like Ikaruga (try a search YouTube or Wikipedia) and that genre of games tends to use small hitboxes so you can fly very near (sometimes colliding with) enemies to get a 'buzz' and upgrade your weaponry. For the stuff I'm building, I may have a single hitbox or multiple hitboxes defined for the same sprite. Multiple hitboxe ...Show All
Visual C# Config file properites
Hey All! I need to create in app.config sth like this: <Accounts> <Account UserName="John" /> <Account UserName="Fred" /> </Accounts> So it will be a custom section. I tried to get help on it in MSDN Library but after creating custom section I got: <MyCustomSection> <Accounts> <add UserName="John" /> <add UserName="Fred" /> </Accounts> </MyCustomSection> It's pretty good :) But I don't want this <add UserName.. . instead I'd like to have nice <Account> tag what I should change My code is based on ConfigElement example from MSDN instead of URLS I put accounts and I simplified it a lot so I ...Show All
.NET Development clear all data form the database?
I wont to clear all the data from tables in the database. I have studentiDataset, and i tried this code: Form2.StudentiDataSet.Clear() Form2.StudentiDataSet.AcceptChanges() I also tried to add after this code tableadapter update method for all tables but it didn't work. How can i doo that Thanks! This code will never do anything. If you call AcceptChanges before calling Update, then there is nothing for the adapter to do. Remember, when you call Update, the adapter loops through the table and examines each row's Rowstate - so AcceptChanges sets everything back to unchanged. Also, the real question is if you need this action logged or not. If not, the use TRUNCATE TABLE <TableName&g ...Show All
Windows Live Developer Forums Adding a local.live map to a web page.
Hello First I would like to say I am clueless when it comes to code but I have a question. I am a scale model railroad enthusist and I started a map documenting the travels of an Nscale box car that is being sent from member to member on our website. We were wanting to if possiable put the map of its travels on our webpage. What I have read I believe it is possiable to do it but I dont have a clue and the webmaster asked me if I could find out. Here is the map http://local.live.com/default.aspx v=2&cp=41.508577~-86.088867&style=r&lvl=4&tilt=-90&dir=0&alt=-1000&cid=3C9A3DE13EAE41C7!102 We want to put it up on a page here. www.scalerailsonline.com a free model railroad site. Is there an easy way ...Show All
.NET Development Problem System.IO.Compression and Memory objects...
Hello, I have a problem with the Compression library when the Stream passed to the constructor of the GZipStream or DeflateStream it is not a FileStream. I tried to use a MemoryStream object but the last bytes were always missing, I have this code(here I use DeflateStream, but with GZipStream is the same behavior): // Compressed XML Data in a stream object MemoryStream XmlMemory = new MemoryStream (); //link the memory stream with the deflate stream DeflateStream CompressedData = new DeflateStream (XmlMemory, CompressionMode .Compress, true ); //write the xml to the deflate stream ThoroDataPast.WriteXml(CompressedData, XmlWriteMode .WriteSchema); After decompress the data, the last char ...Show All
SQL Server problems executing a SELECT inside a TRAN against other computer
Hi I have a problem executing a SELECT inside a TRAN against other computer For example: IN THE SQL Query Analizer of the COMPUTER2 1) this runs OK BEGIN TRAN SELECT * FROM COMPUTER2.DATABASE.DBO.TABLE COMMIT TRAN 2) this runs OK SELECT * FROM COMPUTER2.DATABASE.DBO.TABLE 3) this runs OK SELECT * FROM COMPUTER1.DATABASE.DBO.TABLE 4) this runs bad BEGIN TRAN SELECT * FROM COMPUTER1.DATABASE.DBO.TABLE COMMIT TRAN The problem is that TABLE locks and it does not finish. I've been looking for similar ERRORS in Microsoft Support but I found nothing I've uninstall and install de SQL server 2000 SP4 and the problems continues the same Please, someone could help me, thanks It is still not clear what you mean when you say the table ...Show All
