JGttttt's Q&A profile
SQL Server Replacing symmetric keys
I'm trying to develop a procedure for re-encrypting data with a different symmetric key, but I need the new key to use the old key name. I want to do this without leaving the data in clear text at any point. I would think the process would work like this: 1.Create a new key 2.Decrypt data w/old key and encrypt with new key. 3.Drop old key. 4.Rename new key using the old key name. However, I can't find that there's a way to rename a symmetric key. Is this correct If that is the case, I believe I have to do an additional round of encryption: 1.Create a temp key 2.Decrypt data w/old key and encrypt with temp key. 3.Drop old key. 4.Create a new key with the old key name. 5.Decrypt data w/temp key and encrypt with new key. 6.Drop temp ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 1.) Lock/Unlock vs. SetData/GetData and 2.) predefined vertex formats
Two points spring currently to my mind. Is there any reason besides simplicity not to use the common Lock/Unlock mechanics I would prefer the addition of this to the API. GetData/SetData canthe simply be mapped onto this. I have a large terrain, that I tesselate into the locked buffer directly... With this new scheme I have to build a temporary array and then copy over via SetData, same with textures. On the other hand, if we have to live with this, why do we have the managed pool anymore, kind of pointless! The other thing are the predefined vertex formats... Any reason to not expose the members directly and use setters and getters instead I don't see the point here too, this just forces us to create one intermediate result and copy oper ...Show All
Windows Forms Problem to update the db and read COM port
Hi everyone I m in trouble, plz help me. I have designed a form application using Access 2003 which stores data. I m working with a weight machine that connects with wire through COM port. the machinne read the weight of object and transfer the value to COM port. Now I m want to know "How retrive the value from the COM port and store in Access DATABASE " Second One is that "I want to update access database from one to another system" Plz help me, its my project work. If you have a VB6, you can use mscomm.ocx. http://www.devhood.com/tutorials/tutorial_details.aspx tutorial_id=320 If you don't http://msdn.microsoft.com/msdnmag/issues/02/10/NETSerialComm/ Use OLEDB related data objects to connect to a ...Show All
.NET Development deleting element using xpath
Howdy, I'm using vb.net with XML and am having a lot of trouble deleting a whole element in an XML file using vb. Here's an example of my schema: <stack> <property name="id">1</property> <property name="name">Test Name</property> <property name="subject">Test Subject</property> <card> <property name="name">Card Name`</property> <property name="front">Card Front</property> <property name="back">Card Bacak</property> </card> </stack> Say i wanted to delete the card node with the card property name of Card Name If anyone has an example of how to do this, or even an msdn arti ...Show All
Visual C# how to use the same process to open several files
i want to open several files by using the same programe, just like ultraEdit, when open a new file, it check whether ultraEdit is in processing, if it is, then open the file use the ultraEdit process with a new "tab". so i wonder how to achieve it in c#, and i have use follow code to check whether a program is in processing and get the process. And then, how can i open the new file use the exist process private static Process RunningIntance() { Process currentProcess = Process.GetCurrentProcess(); Process[] processCollection = Process.GetProcessesByName (currentProcess.ProcessName); foreac ...Show All
SQL Server RECEIVING from QUEUE by ConversationHandle
Is it possible to receive from a queue by a conversation handle In the documentation there is an example that show you how to do it. Yet, if you "read" the whole document it says that the conversation handle can not be an expression. The WHERE clause of the RECEIVE statement may only contain search conditions that use conversation_handle or conversation_group_id . The search condition may not contain any of the other columns in the queue. The conversation_handle or conversation_group_id may not be an expression. Here is what I'm trying to do: ; RECEIVE TOP ( 1 ) @MsgBody = CAST ( message_body as XML ) FROM ProcessingLetters WHERE conversation_handle = @Conversation_Handle It doesn't seem to mat ...Show All
SQL Server SQL CE top/limit, unable to find WORKABLE solution
Hi all, I'm being driven to distraction by my inability to find a workable solution here, i'll try and lay out my problem as simple as possible: My application analyses sentence structure, it stores hundreds of thousands of web pages, and stores all the words on those pages sequentially in a database with a primary id, the id of the page the word is from, and the word itself of course. ie : id , parent_id , word What i'm trying to do (which already works successfully in both SQL and MySQL) is to retrieve the word immediately before the one I specify and 3 words after the word I specify. Ideally in one union query but i'll accept it if that's too complex and go for two for now. Because of the sheer size of the database ( millions of keyword ...Show All
Visual C++ How to build image viewer?
Hi, I am trying to learn windows programming again, many years since now so I have forgot a lot. I want to build an imageviewer and need some advices on how to do it. Dont need a lot of code just an overview. I want to do it this in small steps so I can understand how everything works together. The first thing I want to do is to create a form which shows my thumbnails. When it is done I want to move on with other functions like showing a full image, categorising them and so on. I have created a form and in it a floatlayoutpanel. Then I have a usercontrol consisting of a form with one thumbnail. I add usercontrols into the floatlayoutpanel so they organise well. Then if I click a thumbnail I will change border color inside the usercon ...Show All
Visual Basic ADO Stream Write wont work
Hi All I can t get ADODB Stream.write to work. I get Runtime error 3001. 'Arguments are of wrong type, are out of acceptable range, or are in conflict with one another' I use Writeline all the time but this is my first time writing binary. Any clues here is my test code Private Sub subStreamTest() Dim cnnLocal As New ADODB.Connection Dim stmStream As ADODB.Stream Dim strMcomDir As String Dim bufBuffer(3) As Variant Dim bytTest As Byte strMcomDir = "R:\NewDB\" & funDateString & ".tpf" bufBuffer(0) = &H5 bufBuffer(1) = &H2 bufBuffer(2) = &HCA Set stmStream = New ADODB.Stream stmStream.Type = adTypeBinary stmStream.Open bytTest = bufBuffer(2) stmStream.Write bufBuffer(2) ...Show All
Visual Basic MDI parent form and child form
Hi, I m doing migration from VB6 to VB.net Previously, i call a child form within MDI form is using call form1.show() Whereas when upgrade to VB.net, even i change the call method to Dim frm1 as new form1 form1.show() But it still give me AccessViolationException The above coding gives me no problem when calling 1 form from another form but when i add MDI form it causes it Error!!! Does anyone know how to solve this problem HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Try changing the following piece of code (in bold) Get If m_GlobalForm Is Nothing OrElse m_GlobalForm.IsDisposed Then m_GlobalForm = New MDIForm() End If Return m_GlobalForm End Get ...Show All
SQL Server MTS
What is microsoft transaction server and for what it is used Hello, MTS is now known as (included within actually) COM+. Amonst other things, it is able to coordinate distributed transactions within com+/MTS aware components. In the old days of MTS, you needed to code specifically for MTS, and manually enlist components into a distributed transaction, then register and host these components within an MTS server instance. Not sure what is required for COM+ nowadays, however a good Googling will soon solve that :) Cheers, Rob ...Show All
Windows Forms ComboBox and TextChanged again (or still)
Hi, I see a couple of posts around this topic but oddly, not this exact question, at least not with an answer. I created two projects, both Windows Application, one in VB 2005, one in C#. I have .NET 2.0 installed. Each project consists of a form with a single ComboBox, and the DropDownStyle of the ComboBox is DropDown. I need to be able to catch both changes to the selection in the list or keyboard edits in the box. In both programs, I add an item to the drop down list when I load the form. Then, I try selecting and then editing. In VB, selecting the item first fires the ComboBox1_TextChanged sub and then the ComboBox1_SelectedIndexChanged sub. Editing fires only the ComboBox1_TextChanged. This is fine. In C#, however, selecti ...Show All
Visual Basic unhandled exception at 0x660688 (msvbvm60.dll) in DBCenter.exe: 0xc0000005: Access violation reading location 0xfeeeffaa
Hi, I have a VB6.0 proejcts (Main Project) which referes 4 or 5 other VB6.0 projects. I have migrated only the Main Project using VS2005 upgrade wizard, it creates interop for the other projects. The application running while closing the applicaiton I am getting the following error : "unhandled exception at 0x660688 (msvbvm60.dll) in DBCenter.exe: 0xc0000005: Access violation reading location 0xfeeeffaa" Please help me to resolve this error. Thanks & Regards Manoharan Sounds like you may have unmanaged code (the VB6 projects) trying to access managed code resources ( the Upgraded Project)...you may have to upgrade your other projects as well to get rid of the ...Show All
.NET Development Another Beginner - Sending html email using System.net.mail
I need to send a html email whose body is contained in an external file. I have sucessfully used the code below to send a simple message but the intended application would send a much larger message body and I would like to keep the message body in a separate file so that it doesn't clutter up the master page I am designing and make it easier to edit using another application. protected void mailSubmit_Click( object sender, EventArgs e) { MailMessage mailMsg = new MailMessage (); if (mailAddress.Text != "" ) { mailMsg.To.Add(mailAddress.Text); mailAddress.Text = "" ; } mailMsg.Subject = "Email Signup" ; mailMsg.Body = "<h1>Hello, World!</h1>" ; mailMs ...Show All
Windows Forms Tab Control problem
Hi, I have a really interesting problem with tab control. I have a tabcontrol with allignment set to Bottom. All the tab pages are added programatically. If the tab pages are few then everything is fine. I get the left right buttons when I resize the form. When I have many tab pages, I don't get any left right buttons to scroll to the hidden tab pages. It looks really bad. I have not been able to find out what I am doing wrong. Can some one suggest a solution I am sure it just a small problem that I am not able to figure out. Thanks! Please post Windows Forms related questions in the Windows Forms forum. Please reserve the .NET BCL forum for questions related to the core .NET library (t ...Show All
