DeepsR's Q&A profile
Visual C++ Visual C++ 2005 - I'm not sure how to run my program, can someone help?
I am trying to learn C++. I installed Visual C++ 2005, and I'm not used to the way it looks or handles. Can someone show me, step by step, how to open a project, write a simple 'hello world' program, and execute it i know how to do this with older versions of visual c++, but this one really got me. thanks all I apprecite it. Take a look at http://msdn2.microsoft.com/en-us/library/6765tta0.aspx describing the different projects and links to how to create such projects. Thanks, Ayman Shoukry VC++ Team ...Show All
Visual Basic WriteAllText Method
Hi guys, I'm a new VB6 user. I'm trying to write text to a file using the reference provided on MSDN ( http://winfx.msdn.microsoft.com/library/en-us/dv_vbalr/html/f507460c-87d9-4504-b74f-3ff825c7d5c4.asp frame=true ) I'm using this code: Private Sub Command1_Click() ' Declaration Public Sub WriteAllText(ByVal file As String, ByVal text As String, ByVal append As Boolean) End Sub My.Computer.FileSystem.WriteAllText("C:\TestFolder1\test.txt", "This is new text to be added.", True) End Sub When I run it, I'm getting the message "Expected End Sub", I tried adding another End Sub down at the end but nothing changed. There seems to be a problem wi ...Show All
SQL Server re-establishing mirror
When witness and mirror were down, mirroring was removed at primary. Now when I try to re-establish mirroring I get the following error Msg 1456, Level 16, State 3, Line 1 The ALTER DATABASE command could not be sent to the remote server instance 'TCP://witness:5022'. The database mirroring configuration was not changed. Verify that the server is connected, and try again. On the witness server the following sql select * from sys.database_mirroring_witnesses returns 1 row with the previous mirroring information. How do I remove old information from witness server Thanks. If the witnes ...Show All
Visual Basic Com Object Failing on server.createobject
I am having problems calling a Com object that I created under Visual Studio 2005 with Standard ASP. I registered it using regasm.exe. Below is my code (VB) . I have tried creating the object two ways. What am I doing wrong Server.CreateObject("TestCom2.TestFunction") and Server object error 'ASP 0177 : 800401f3' Server.CreateObject Failed /mears/ReadUserCert.asp , line 56 800401f3 Calling this way gives this message (which I think is correct) Server.CreateObject("TestCom2.MyComClass") Server object error 'ASP 0177 : 80070002' Server.CreateObject Failed /mears/ReadUserCert.as ...Show All
Windows Forms Check if underlying dataset was updated
I've looked everywhere. This has to be an easy one. How do you check if the data has been updated when using data binding in Windows Forms 2.0. I know you can check each row individually to see if it was modified, but that seems like a lot of work for such a simple task. This will be used to check if something was not been saved during the form closing event. Hello. I guess it really depends on what you're binding to. It sounds like you're bound to a dataset of some sort. If so you can just check the HasChanges property on the dataset instance. For example: Dim MyDataSet as SomeStronglyTypedDat ...Show All
Visual Basic License Agreement Dialog
I'm creating a setup project for an application and I would like to present a EULA to the user. I using the supplied License Agreement Dialog and am supposed to set the LicenseFile Property to the rtf file that contains the EULA. The file was added to the project Simple enough right However when I do a test install the EULA is not shown. Does anyone have any idea as why this is happening Thanks I am a little confused about your reply here...and I may have confused things earlier with my reply. So please try the following: 1. Launch Winword.exe (ms word) 2. Add your text for your agreement dialog 3. Complete a "S ...Show All
Windows Forms removing the focus rectangle from a flat button
i've set up a form with a set of flat buttons, and am wondering if there is any way to remove the large, unsightly inner focus rectangle from them. i notice that a heavy black border also appears around the button when in focus, and that it darkens slightly as the mouse passes over it, and think these two behabiors are more than enough&n ...Show All
Visual C# Removing the double quotes from a CSV file.
I would like to remove the double quotes from a CSV file but am having a bugger of time doing so. My input file looks like this: "Book1 number 1",120.00,140.00,,,"Great Book" "Book2 number 1",12.00,99.99,,,"Losy Book" "Book2 number 2",19.00,34.00,,,"Do not read" First I break up the line into an array so as to be able to manipulate each field easily. string [] strSplitData = strDataLine.Split(','); I now have the line split into an array and can easily do whatever I need to do. But I do not require the " that is leading an trialing in array element 0 and array elment 5. So I try to remove the " with the repla ...Show All
SQL Server report builder not displaying some rows
Hi friends am using report builder to create a report ,the report not displaying some rows. i've 2 tables . Patients and transactions (1- many) and assume that i've following records patient ----- 1 , sriram , albert street,nz 2 , david , victoria street ,aus transactions (flds are patientid,charge,transaction date) ------ 1 , $100, diabetes problem ,10/10/05 1, $100 , diabetes problem , 19/01/06 2, $150,someother problem if i create a report with following fields name , address (from patient table) charge , problem (from transactions table) i get following results sriram , albert street,nz,$100 david , victoria street ,aus , $150 as ...Show All
Visual C# Accessing a DataGridView control from a thread that it wasn't created in???
This is the exception I'm getting: "Cross-thread operation not valid: Control 'dgvLogResults' accessed from a thread other than the thread it was created on." I'm trying to update a datagridview with new data that has been detected in a thread that is running and polling. But I can't seem to get this to work do I have to reference the original thread somehow then access the control Use BeginInvoke on the form that contains the object. Depending on how you have it set up you might also want to use InvokeRequired. I tend to use things like the following: private void SearchComple ...Show All
SQL Server Inconsistent Errors Using Bulk Insert with a Format File
As part of a c# program, utilizing .Net 2.0, I am calling a sproc via a SqlCommand to bulk load data from flat files to a various tables in a SQL Server 2005 database. We are using format files to do this, as all of the incoming flat files are fixed length. The sproc simply calls a T-SQL BULK INSERT statement, accepting the file name, format file name and the database table as input paramaters. As expected, this works most of the time, but periodically (to often for a production environment), the insert fails. The particular file to fail is essentially random and when I rerun the process, the insert completes successfully. A sample of the ...Show All
.NET Development Convert XML to Excel spreadsheet using XSLT
Hi all, Im very new to XSLT and I need to convert an XML document in the format of: < xml version="1.0" encoding="utf-8" > <AreasRoot> <room name="Entrance Hall"> <item name="Doors"> <roomIndex>0</roomIndex> <conditionBefore></conditionBefore> <conditionAfter></conditionAfter> <commentsBefore>< ...Show All
Visual Studio Express Editions Multithreading any examples for VB 2005 Express?
Tried multiple samples from Planet Source and others... all return: Cross-thread operation not valid: Control 'ListBox1' accessed from a thread other than the thread it was created on. I was tring to add multiple items in rhe Listbox. Anyone have a Net 2 example Hi, Here are a couple of samples from MSDN. http://msdn2.microsoft.com/library/w1w6424a(en-us,vs.80).aspx http://msdn2.microsoft.com/library/tbbty0e4(en-us,vs.80).aspx cheers, Paul June A. Domag ...Show All
.NET Development Inserting large amount of rows using ADO.NET
Hi , I have a requirement to read rows from Table A on Server A and insert into Table B on Server B. Unfortunatley, Server A and B are not linked , so i can't use a Insert SQL to do the inserts. I am thinking of reading rows from Table A and inserting into Table B using ADO.NET. My question is : 1) Is there a way in ADO.NET 1.1 to do bulk inserts The insert will be done by a stored procedure , but I don't want this Stored proc to be called for every row in the datatable. 2) In case I do have to call the Insert Stored Proc for each row in the table, will it be efficient enough for a datable with say 1 million rows 3) Is there ...Show All
SQL Server Large objects and the transaction log
Hi there! I'm a little bit in doubt because of the behavior of the transaction log in the case i have large transactions inserting and deleting a lot of (i.e. 100) large objects (data type image) with a size (each) about 20MB. I expected that the transaction log should grow with 2GB each of this large transactions. But it does'nt. Are these large transactions not logged - so that in case of disaster all lobs since last diff- or full-backup are lost Some experience with that Greetings, Torsten First off, I assume that your database in not in Simple recovery mode, right If it is, then the tra ...Show All
