There are many ways. _Using OLE Automation _Using thirst party component: Aspose, FarPoint... _Make it yourself
nguyenvhn
Posts
-
make file excel(*.xls) from vb .NET 2003 -
Connection pool and open & close ...???I think the first way is acceptable. The close method returns connection to the pool and open method get a freely connection from pool. The second way seems to be a bit better performance but it will charge a lots of cost of changing sources
-
Show subitems of an item in listboxCreate in memory a data structure to store all items in Listbox2 associated with each item in Listbox1. A dictionary or hashing table will be appropriate. When adding an item to listbox2, again adding it to that data structure. When selected item in listbox1 changed, reload all items associated with listbox1 selected item to listbox2. Hope that helps
-
Visual Studio: ncb fileIt will be created automatically when opening project
-
Access control from a user defined class (Dialog based application)Define a class member variable that hold a pointer to dialog, then access CEdit through that member.
-
Problem with ButtonEvents on dynamic UserContolsGood comment. I have not tried yet but it give me alot information. Thanks so much.
-
Can logon page be skipped if form authentication is used?The user will be redirected to login page as in Web.config
-
phpThat's true when using in Web Programming
-
How to Select the last N records based on date?SELECT web_News.ArticleDate, web_NewsLocalized.ArticleTitle, web_NewsLocalized.ArticleText, (SELECT COUNT(*) FROM web_News AS B WHERE B.ArticleDate>=A.ArticleDate) AS RowNumber FROM web_News AS A INNER JOIN web_NewsLocalized ON web_News.ArticleId=web_NewsLocalized.ArticleId WHERE ((web_NewsLocalized.ArticleCulture)=[@Culture] AND RowNumber<=@N) ORDER BY web_News.ArticleDate DESC;
I am not sure wheather it works, I've not tested yet, but just try it anyway. The performance will be a big problem -
Executing a Stored Procedure thru VS2005In this case, the database stored boolean as a signed type (integer for example). All bits will be 1 for true and 0 for false. If first bit is 1, then that value is a negative one.
-
getting information based on DateTimeselect * from order WHERE ord_date = @ComparedDate
@ComparedDate is a DateTime parameter, you have to provide it's value from caller.Dim cmd as new SqlCommand(select * from order WHERE ord_date = @ComparedDate", conn) cmd.Parameters.Add(new SqlParameter("@ComparedDate", SqlDataType.DateTime)).Value=Convert.ToDateTime("14/09/1994") Dim reader as SqlDataReader=cmd.ExecuteReader() ...
-
How to Select the last N records based on date?If you are using SQL Server 2005, there is a simple way:
SELECT TOP(@N) web_News.ArticleDate, web_NewsLocalized.ArticleTitle, web_NewsLocalized.ArticleText FROM web_News INNER JOIN web_NewsLocalized ON web_News.ArticleId=web_NewsLocalized.ArticleId WHERE ((web_NewsLocalized.ArticleCulture)=[@Culture]) ORDER BY web_News.ArticleDate DESC;
-
Problem with SQL 2005 Express: View Sorting OrderHello everybody I have a problem with SQL Server 2005 Express. Here are description: In a database, there is a table, name TEST with three columns: a(int), b(int), c(char). I created a view as the following:
CREATE VIEW [dbo].[view_test] AS SELECT TOP (100) PERCENT A, B, C FROM dbo.Test ORDER BY A, B
Clearly, I want the result set ordered by column A and B. Then I executed the folowing query:SELECT * FROM view_test
But the result is not sorted. In SQL Server 2000, the problem does not happend. Is there any comment? Thanks so much. -
How to convert a movie/video file into an exe?No way. Make it yourself. Write a program that can play such movies and try to embed that movies in the program as resource.
-
View/sniff HTTP packets from browser to Web serverIt would be implemented in the way of a proxy application. Just listen in a free port and using it as a internet proxy
-
Displaying Korean/Chinese Characters???Make sure that resource file was saved with correct unicode encoding. Because of VC++ 6 did not support editting unicode text in its IDE, you may have to open resource script file in an external unicode-based editor to create string resource and save it in unicode format. Try VS.NET 2005 Express, it is free version all fully supporting Unicode.
-
String comparisonIf you are using SQL 2005, you can use HashBytes function to calculate a hashing value of password then compare two hashing values. If you use SQL 2000, you can use BINARY_CHECKSUM function instead of.
-
Dialog Based ActiveX ControlI am not realy sure the problem but I think you should move:
CRect rcPanelRect(rcBounds.TopLeft(),CSize(rcBounds.Width(),rcBounds.Height()/4)); configPanel.MoveWindow(rcPanelRect,TRUE);
to OnSize event handler. -
stored procedure Output parameter value is NullI did not see the statement setting value for @genmask_code so infact, it have no return value. Also I think exec GetUserControlTemplateCode 1,'x' will not work because of lacking OUTPUT modifier. It should be:
exec GetUserControlTemplateCode 1, @x OUTPUT print @x
-
Overloaded member function not found in CNoteMgrChanged as the folowing:
BOOL CNoteMgr::drawLine(HDC,HPEN,POINT*,HWND); BOOL CNoteMgr::drawCurve(HDC,POINT*,HWND);
Because of your implementation is POINT[]