Deffie's Q&A profile
Visual C# Using OleDbConnection to populate DataGridView
I'm a bit new to this, so pardon my ignorance if this is well-known. I've been searching the net, but no luck yet. I have an established OleDbConnection that I want to use to populate a DataGridView. I can run SQL queries on the connection and see data sets, but I would like to present a view of that data in my grid. Also, I'd like to be able to only show a fouple of the columsn, but hold on to the full data set for later use. Any pointers would be appreciated... Thanks. So, here is my grid init code. The grid seems to display fine: // make the connection to the database _db = new OleDbConnection ...Show All
Visual Basic Screen dump
Hi ,I have a small Question ,How do we take the screen dump of a compilation errorRishi http://www.help2go.com/Tutorials/Windows/Capture_a_Screen_Shot_in_Windows.html Basically do a <Alt> <Printscreen> and then open paint and paste the clipboard into a paint document and save as a bmp or whatever graphic file you want. ...Show All
Visual Studio assembly microsoft.stdformat 7.0.3300.0 required
When I load a Visual Studio app on to a 'virgin' system I get a message saying that assembly Microsoft.stdformat be installed in GAC. When I tried adding the Microsoft.stdformat to my Visual Studio project (references) I get a not found message. Anyone have any ideas Thanks in Advance for you r help, Charlie Hi Charlie, I don't know what this assembly is or why it's saying that. However, to install something in the GAC, you use the gacutil tool that comes with the .NET SDK (which you can download from Microsoft). It's like this: gacutil /i <<assemblyfilename>> Dan ...Show All
Visual Studio 2008 (Pre-release) Problem with template parameter inference
Hi All, I want to extend all IEnumerable<T> with a method called SomeOp. Usually I would define the extension like this: static class Sequence { public static IEnumerable<T> SomeOp<T>(this IEnumerable<T> sequence, Func<T, bool> func) { return sequence; } } As the operation always returns an object of the input type, I want to be able to write: List<int> integers = new List<int>(); List<int> ints2 = integers.SomeOp(x => true); To do so, I defined the exension method like this: static class Sequence { public static Enum SomeOp<T, Enum>(this Enum sequence, Func<T, bool> func) where Enum : IEnumerable<T> { return sequence; } } Compil ...Show All
Visual Basic PrintForm - Printing to a specific tray on the printer
How do you make the printform object print to Tray 2 on the printer I see where you can view the papersources, but I don't see a way to choose the papersource. Hi Stephen, you just need to set the papersource for the defaultpagesettings before you call Print. This is the same way you would set the paper source for a printdocument. The trick is to find out what the printer supports For example: For Each PSource As System.Drawing.Printing.PaperSource In PrintForm1.PrinterSettings.PaperSources If PSource.Kind = Printing.PaperSourceKind.Custom Then PrintForm1.PrinterSettings.DefaultPageSettings.PaperSource = PSource Exit For End If Next For more ...Show All
SQL Server Data transfer from ODBC to Sql Server
Hi Can Anybody tell me the different ways of transfering data from ODBC Layer to SQL Server using C#. I want to transfer using Threads,means by running 4 threads, I need to transfer 4 tables at a time. Though we have SQLBulk copy Object in .NET it's not useful in multi threader env. Can anybody help me in this. My Vizai wrote: Thanks for the reply Duane . I'm also looking for that , how to . There are probably several ways to do it. One way is to implement a call back when a row is inserted. There would need to be a sql server trigger that fires each time a row is inserted. The call back would notify the client each time the trigger fires. Exactly how you would structure the call back is up t ...Show All
SharePoint Products and Technologies List of All SharePoint Sites (Site Directory not enough)
I need to get a report of all sites created within our SharePoint site. I tried the Site Directory, but I know there are some missing here, because you have the option of *not* including it in the directory when you create it. How do I get to this information Thanks, Jen Joel Oleson wrote: Look at the stsadm enumsites command in the SharePoint bin directory, it will give you a list of all the site collections and owners. stsadm -o enumsites -url http://webappname ...Show All
Visual Studio Express Editions Run a program from c++ | newb question
Hello Im just wondering, how can i let my program execute some other program. like when i click on a button it starts word, or when i click another button it starts like excel or something. Thankyou..... Hi, C code: system("your.exe"); For native code with Win32 functions: ShellExecute as a simple wrapper over CreateProcess. The Express version lacks the windows headers. You will need to download the Platform SDK For .Net code: System.Diagnostics.Process.Start("notepad.exe"); -- SvenC ...Show All
Visual C++ Help rookie programmer please...
Hi, i'm new at C++ and VC++ , and i don't know same basics. I have a homework that i can not deal by myself. So i'll be too happy if you help me. My problem is that; in my homework i'll make a simple chat programme using Windows forms. But i don't know using classes in the forms. For example, where to define the managed classes such as Socket. Then, i can't also call this class. Error occurs when i try to call such as MyWork::Form2::MyFunction() ... Do you also suggest a good tutorial about these subjects. There are some codes in MSDN but i couldn't run them... In MSND library, i saw such an example to display user defined dialogs; { Form ^ f = gcnew Form(); f->ShowDialog(); } And i ch ...Show All
Visual Basic Problem with Getfiles and Login Information on the source pc.
I am using the following code to get a list of filenames from a directory on a pc on our network. Dim query As String Dim x As New System.IO.DirectoryInfo( "\\shipping\ShippingC\KEWILL\CSWIN\ARCHIVE" ) 'Dim x As New System.IO.DirectoryInfo("C:\KEWILL\CSWIN\ARCHIVE") Dim s() As System.IO.FileInfo = x.GetFiles( "*.cs" ) Dim a As New ArrayList Dim tn As TreeNode tn = New TreeNode( "Dayfiles" ) TreeView1.Nodes.Add(tn.Clone) For Each dayfile As System.IO.FileInfo In s tn = New TreeNode(dayfile.ToString) 'tn.Nodes.Add(dayfile.ToString) TreeView1.Nodes.Add(tn.Clone) Next Everything works fine as long as I log into the p ...Show All
Visual Studio Lost Keys (Problem deleting chars)
I'm not sure using the right section. If there is a better one, feel free to move this topic. Now my Problem: I can't delete any chars from my Source using Visual Studio 2006 Professional. I can insert code but i can't delete it. I can't insert a line using ENTER. BSP and DEL doesn't work. Coding without this keys is very... complicated. Is there anybody who knows to fix this problem Thanks A few people on GameDev.net have had the same problem, as detailed at: http://www.gamedev.net/community/forums/topic.asp topic_id=412033 The solution they found (with a now-broken link to an MSDN post) was to delete all VS setting files: C:\Documents and Settings\<username>\Application D ...Show All
Visual Studio Add reference to project?
I've successfully added a file to my project but want to add references to the project and can't figure out how. I've got the project object from the solution object from the application object. Please show me how. Thanks, Devin You need to use the VSLangProj.References class and the Add method. See my article: HOWTO: Getting information specific to VB.NET and C# projects from an add-in or macro http://www.mztools.com/articles/2005/MZ011.htm ...Show All
Visual Studio Tools for Office any way to print excel directly with one button click
hi all, May i know is there any solution to print excel file (the file is on Web server) with one button click (without open the excel file in browser) thank you. This forum is for questions concerning the VSTO technology; VSTO is a way to use .NET code instead of "native" Office VBA in document-centric solutions. So Val has sent you to the wrong place :-) You can ask your question in an excel-specific group, or the Office.developer.automation group, HOWEVER: there is certainly no way to print an Excel file without first opening it in the Excel application environment, whether that's a browser window, or an Excel application window. For links to the various Office newsgroups, please ...Show All
Visual C# Please specify the assembly explicitly in the type name
The type 'DocumentPage.Global' is ambiguous: it could come from assembly 'C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\documentpagece15\b19d9bc2\App_Code.zxs3sy7_.DLL' or from assembly 'C:\Projectos AS\Projectos 2005\DocumentPage\bin\DocumentPage.DLL'. Please specify the assembly explicitly in the type name. How can i solve this problem Thank's! The Microsoft.SharePoint.dll is in the bin directory, so that's not the problem! This was a migration from 2003 to 2005 and i never had this problem before! ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Drawing Bitmaps to IDirect3dSurface9
Hello, first of all i want to render a video stream to a IDirect3dSurface9 (in the beginning on the primary display device later on a secondary monitor) so at first i'm trying to draw a simple bitmap on the surface... i've created IDirect3d, IDirect3DDevice9 and IDirect3dSurface9 objects... and i've got a window that i've registered and created. It doesn't matter if the bitmap/video is in the window or not. better would be if it were in the window. how can i do it i've tried it this way: pPrimary->BeginScene(); pSurface1->GetDC(&hdc); hdcMem = CreateCompatibleDC(hdc); old = (HBITMAP)SelectObject(hdcMem, hBitmap); GetObject(hBitmap, sizeof(BITMAP), &bm); BOOL tmp = BitBlt(hdc, 0, 0, bm.bmWidth, bm.bmHeight, ...Show All
