dsl_beginner's Q&A profile
Visual C++ MFC newbee problems to create worker thread
I am new to MFC. I am just trying understand threading. I tried to create a worker thread, and I get a linker error when I compile the code. in CMFCThreadingDlg.cpp I put... void CMFCThreadingDlg::OnBnClickedBtnStart() { HANDLE hThread; hThread = AfxBeginThread(foo, this ); } static UINT foo(LPVOID lParam) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); return 0; } I have put the foo prototype on the header file. I get the following error: Error 1 error LNK2019: unresolved external symbol "private: static unsigned int __cdecl CMFCThreadingDlg::foo(void *)" ( foo@CMFCThreadingD ...Show All
Windows Forms Datagrid clear
Hi, I use a datagrid to show a query's results. (datasource=datatable). But I need to clear rows before I get new query results. How can we do that Thank you... I cleared DataSet instead of DataGrid. It worked. Thank you. ...Show All
Smart Device Development Visual Studio 2003 Emulator connection problem
Hi Everybody Is was hopeing, that somebody in here would be able to help me out with my problem, since I haven't had much luck solving my problem my self. The problem is pretty common as far as what I've read in this forum. I run Visual Studio 2003 on Windows XP SP2 US in vmware ACE. I've installed the following software. SDK for Windows Mobile 2003-based SmartPhones SDK for Windows Mobile 2003-based Pocket PCs Windows Mobile 2003 Second Edition Emulators for Pocket PC Windows Mobile 2003 Second Edition Emulators for SmartPhone I've since then tried installation the Windows CE .NET Utilities v1.1 for Visual Studio .NET 2003, but that didn' ...Show All
SQL Server Variables in CONTAINSTABLE. IS IT POSSIBLE? NO ERRORS AND NO RESULTS.
I know the use of variables is allowed with CONTAINS but I can't seem to get return results with CONTAINSTABLE My test Code: DECLARE @textstring varchar(4000) DECLARE @firstword varchar(80) DECLARE @secondword varchar(80) SELECT @textstring = ltrim(rtrim('SAP America Inc') select @firstword = dbo.GETWORDNUM(@textstring, 1, ' ,.:') --Returns the first word with no spaces, commas or colons select @secondword = dbo.GETWORDNUM(@textstring, 2, ' ,.:') --Second word select @thirdword = dbo.GETWORDNUM(@textstring, 3 , ' ,.:') --Thirdword SELECT c.companyIntID, c.CompanyName, KEY_TBL.RANK FROM Companies as c INN ...Show All
Visual Studio 2008 (Pre-release) Hyperlink within a TextBlock?
Hi again folks, It used to be you would use RepositionWithContent() -- that method went away with the PDC CTP. So, I'm feeling mighty dumb here (although the sparse documentation on this might be contributing to that feeling...) -- how on earth can I shove a hyperlink within a TextBlock now (and is that even the right way to approach it anymore ) Thanks in advance, John Here is another possible approach: TextPointer p1 = vltb.ContentEnd; p1.InsertTextElement(vlhl); ...Show All
Visual Studio Express Editions CDate function returns 'IndexOutOfRange' error - also in VB.Net 2005 Beta2
Hi folks, I have already reported this error in the VS 2005 Beta2 forum, but was told that it was not reproducible (VbCity and VBug, and your UK Launch team were also unable to reproduce the problem). I think I now have a lead on the issue! It also looks similar to a problem reported yesterday on the VB Express forum - 'I keep getting the out of range exception'. I have condensed the problem to two lines of code: Dim myDate as DateTime myDate = CDate("01/01/2005") The above error is reported on execution of the second line. This has now occurred on 6 different ...Show All
Visual C++ mousedown question
I'm trying to find out when the last time the mouse was clicked. I find plenty of info on where , but nothing on when . Any help would be appreciated. There is no such information about this. Add a handler for the mous click and use GetTickCount() to save the time when the function was entered. There is also a function GetMessageTime that gives you the exact tick count from the point were the message of the click was created. You know that due to the message queue processing there might be a difference in time when the message is created and when the message arrives in you handler. http://msdn.mi ...Show All
Windows Forms Save datagridview layout to file
Hi, I want to save a datagridview layout to a file. Not the data - just the columns, their formatting and the fields they are bound to. Can this be done (and how!) Paul. One way to do this would be to inherit from DataGridView and implement IPersistComponentSettings. This is a new interface in Whidbey exactly for this use - to persist ...Show All
.NET Development .Net Oracle process error
hi This is regarding a performance issue in my windows application... Maximum possible process in my oracle server is 150... Sometimes my users wont be able to log on to my application since it exceeds maximum processes.. so we have to restart my oracle server.... Can anyone suggest the best practise to avoid this...im using Visual studio 2003 and coding in VB.Net Thanks Raju, I don't have any Oracle knowledge, but at a guess, are you making sure that you are calling Dispose on your database connections when finished with them How are you connected to the Oracle server ...Show All
Windows Forms Add button control inside DataGridView
1) I would like to show my table in the DataGridView and allow the user to edit some of the fields which are integer type. I need to put two buttons next to the value. One of them is to add 1 to the value while the other one will minus 1. It's idea to put the add button on top of the minus one. However, I can't find any good reference on how to do this. Please advise. 2) Moreover, how can I control the button behaviour I've tried adding the DataGridViewButtonColumn into my DataGridView. However, I've no way to program like the other button control. Yes. The solution is already available in MSDN. However, I've already abandoned this ...Show All
Visual Studio Regarding MSdotnet SDK Installation
Hi Can we change the Installation Directory of MSDotnet SDK . if possible how can we achieve it. we are creating a customised package without any user input. and our requirement is to install this SDK on both servers as well workstations. In workstations(windows XP SP2) The application will be installed to C:\Program FIles \.... we want to change this to D:\Program FIes on Servers (Windows 2003). we tried by installing through command prompt by giving TARGETDIR=D:\Program~1 but the MSI was installing to the same location i.e C:\Prog~1 The code we used in the command prompt is msiexec /i netfxsdk.msi USING_EXUIH=1 TARGETDIR ...Show All
Visual C# Convert a string (diffrent formats) to date
Hi I got diffrent date formats from a database and I would like to convert the to a date. I don't have the option to work with the sql, since that query is fixed (long story) "20051231","2005-12-31","2005-12-31 09:29:52" ==> "2005/12/31". My first tought was to trim the string and remove "/" and " ", after that only read the first 6 char of the string and as the final step chope the string up in "2005","12","31". There after build upp "2005/12/31". It seems to by much work and not so easy either as I tought. Does anyone have ...Show All
Visual Basic Open an existing Excel File
Hi, I have recently installed Microsoft Visual Basic 2005 Express Edition and would like to open an existing Excel file from a command button within the application I am making. Having scanned through the help and forum sites i have made the following code which does not provide any errors, however when I click the command button the mouse cursor changes to the 'Busy' cursor then nothing happens. Here is my code: Private Sub Button1_Click( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim xlTmp As Microsoft.Office.Interop.Excel.Application xlTmp = New Microsoft.Office.Inter ...Show All
.NET Development C# - OleDb - Access(MDB) : storing and retrieving images
Hello, I am currently banging my head against the wall and it is starting to hurt, I am trying to store images used in a windows application within a .mdb database. Within the table of the database the field in question is set to OLE Object. The method I am using to put the image into the database is as follows: public static bool UpdateContractor(Utils.Contractor cnt) { if(! DataManager.bReady) throw new DataManagerNotReadyException("The local database is not ready"); //serialise the image MemoryStream memStream1 = new MemoryStream(); BinaryFormatter formatter = new BinaryFormatter(); form ...Show All
SQL Server Designing Aggregations
Does anyone know of a way to copy aggregations in the BI Studio I know you can copy aggregations in management studio after the cube is deployed... Trying to do it at design time. Thanks Mark You can switch to the "Code View" in BI dev studio and copy following property < AggregationDesignID > YourAggregationDesignHere </ AggregationDesignID > From one partition to another. Edward. -- This posting is provided "AS IS" with no warranties, and confers no rights. ...Show All
