SamTran's Q&A profile
Visual Studio 2008 (Pre-release) DataGridview with DLINQ
Using Visual C# Express in a Windows Application I write with ADO.Net: SqlDataAdapter sql_adapter = new SqlDataAdapter("Select * from Customers", "Data Source=.\\SQLEXPRESS;AttachDbFilename=northwnd.mdf"); DataSet ds = new DataSet(); sql_adapter.Fill(ds); dataGridView1.DataSource= ds; dataGridView1.DataMember="Table"; May somebody translate previous sentences used in a WinForm to show in the datagridview the customers rows, for similar using DLINQ Thanks in advance Roberto DLinq team is still working on data binding story; but beca ...Show All
Visual C++ SSE3 architecture
First, excuse me for my English but it isn't my native language Then... with Visual Studio .NET 2005, the C/C++ compiler can apply SSE and SSE2 optimizations via / arch:SSE and / arch:SSE2 , can it also apply SSE 3 optimizations (there isn't any "/arch:SSE3") or does this *need* "manual" optimizations to the source code Thank you very much To get SSE3 in your code you need to use the instructions themselves via asm. Right now the compiler doesn't support SSE3 optimizations, but then again it takes a while for these things to get into any compiler. So if you want SSE3 optimized functions, ...Show All
Smart Device Development How I Can return datatable Or dataset to ppc by socket
I working to program PPC. Now I can send string (Query) To Pc Execute Query With Socket buy I don't know How pc to return Datatable or dataset to PPC.Can Advice Me I think.I'll send xml to solve this problem but I don't know How to coding. You have a couple of options if you want to transfer data between the desktop and the device - web services - Sql Mobile Do read up on MSDN about both. However, I'm concerned about the security implications of sending a query to a web service directly - I hope you take care of the security issues involved ...Show All
Visual C# How to import a dll made in C++ Win 32
Hello Everyone, I have a dll which is made in Win 32, as it is not an assembly neither COM can't be used as a refrence, so I have to Import it.... Can someone tell me how to do it...As when i do it asks for the entry point and secondly how to call the functions from that dll.....A brief example will be highly appreciATED... Thanks, Harsimrat Thats simple.. u have to use System.Runtime.Interopservices in your main class: do this: [Dllimport("the dll path")] public static extern void nume_of_function(string t\his_params); Remeber that you have to adapt to c++ parameters.. ...Show All
SQL Server LDAP update from SQL Server
How do I do This update a set extensionAttribute1 = '93669' from OPENQUERY( ADSI, ' SELECT [Name], SN, mail, extensionAttribute1, samAccountName FROM ''LDAP://marshall.usc.edu/ dc=marshall,dc=usc,dc=edu'' WHERE objectCategory = ''Person'' AND objectClass = ''contact'' and samAccountName = ''clarkbak'' ' ) a Given that this works: select name from OPENQUERY( ADSI, ' SELECT [Name], SN, mail, extensionAttribute1, samAccountName FROM ''LDAP://marshall.usc.edu/ dc=marshall,dc=usc,dc=edu'' WHER ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Unresponsive Visual Studio during build
I have a nice, dual-core build machine with RAID-1 Raptor 150 disks and 2 GB of RAM -- typically, I can keep working while building in the background on this machine. However, when using XNA to build the MC2 sample, the Visual Studio window was mostly unresponsive duing the 7 minutes and 14 seconds it took to build. Most of that was because it spent 532 seconds in the CreateTGL stage, during which clicking anywhere in the Visual Studio window did nothing. In fact, I got a task bar balloon telling me that "Visual Studio is busy; please report this problem to Microsoft if it happens often." I understand that this is a technology pre- ...Show All
Windows Forms system idle process
what is it what does it do and why is it always high in terms of CPU usage in my task manager thnx I have found out that there are several items that run in the system idle process, they are actually hing in there as a generic term. Thse include sypware!!!! DEFRAG programs, and/or virus cans. If you have installed any of these or they have installed without your knowledge get rid of them. try the spyware first....then defrag or disk maintenance programs. ...Show All
SQL Server Buffer Latch error
I have a backup database job that failed with the following error on sql server 2005 Executed as user: TestUSer. Time-out occurred while waiting for buffer latch type 3 for page (1:10541989), database ID 8. [SQLSTATE 42000] (Error 845) BACKUP DATABASE is terminating abnormally. [SQLSTATE 42000] (Error 3013). The step failed. Does anyone know why this happened Is it the server or the array Any help is appreciated. Thanks Check your database storage for hardware errors (disk failures, fibre connection, I/O errors, etc) This was a bug on SQL 2000 and 7.0, solved with a service pack. But i gue ...Show All
Visual Studio Multiple Project Creation Template
I want to add several 'C# Class Library' projects (in one hit) to a particular 'Solution Folder' when the user chooses the Add submenu on the solution Folder I have setup a UnboundTemplateReference to provide the command to the Solution Folder's Add Menu - that's appears fine. I have created a ProjectGroup template as follows. When I click the menu command, it displays the File | New Project dialog box, where I have to manually select my template. I'd like to skip the dialog and go right to displaying my recipie to get the name of the project Group etc. Is this possible <VSTemplate Version="2.0" Type="ProjectGroup" xmlns="http: ...Show All
SQL Server Intermittent Error 40 on Report Manager
Hi, I have my Reporting Services up and running and deploy the AdventureWorks samples without any errors. I can browse to http://localhost/reports, click on the AW samples, but when I then click on actual report, I sometimes manage to get the report parameters returned, sometimes get the below error. In all cases it takes 40-50 seconds to get a response, during which time the CPU usage jumps up and down between 0% and 100%. An error has occurred during report processing. (rsProcessingAborted) Cannot create a connection to data source 'AdventureWorks'. (rsErrorOpeningConnection) An error has occurred while establishing a connection to the ser ...Show All
Smart Device Development StringSplitOptions not working
In my code I have the following line which splits a string into multiple strings using the end-of-line as a seperator: string [] reqStringArray = reqString.ToString().Split( new string [] { "\\r\\n" }, StringSplitOptions .RemoveEmptyEntries); According to the documentation this function is now supported in the Compact Framework 2 as well, but it doesn't seem to recognize the StringSplitOptions object: "The name 'StringSplitOptions' does not exist in the current context" The weird thing is that the Intellisense does have the StringSplitOptions object in the list when I type it. Any ideas why it is not worki ...Show All
Visual Studio Express Editions Windows service application in Visual C# Express
I'm trying to build a simple Windows Service application in Visual C# Express. I simply can't get started. The documentation mentions a NON -existent template, which makes it kind of hard. However, I can see there's a 'ServiceBase' item in the toolbox and I have a feeling that that's the way to go, but there's no documentation telling how to use that. If I start a Windows Form application, I can drop this 'ServiceBase' component on the page, but this must be the wrong approach. Can anyone point me in the right direction - a step by step approach to get started would be really nice (missing in the help files). What project ...Show All
Software Development for Windows Vista Passing parameters to custom activity Beta2
In beta1, there was the ability to define properties on a custom activity and then set them at run time to a property of the parent workflow. This appears to be gone in beta2. What is the simplest way to do this now Riley In Beta2 there are code snippets that does the same thing. Go to code beside file, right click, say Insert Snippet... \ Workflow \ Dependency Property ...Show All
Visual C# Printing an image
Hi everyone, Can anyone show me a SIMPLE piece of code to print an image I'm asking because thus far I've found code that would make a rocket scientist wince. thanks, Ed. I don't think it gets much easier than: private Bitmap _bmp; private void Form1_Load( object sender, System.EventArgs e) { PrintDocument pd = new PrintDocument(); pd.PrintPage += new PrintPageEventHandler( this .PrintImage); _bmp = (Bitmap)Image.FromFile(Application.StartupPath + "\\test.jpg"); pd.Print(); } private void ...Show All
Visual Studio Express Editions I Can't get cout to work
if i declare iosteam like this #include<iosteam.h> i get " libcimtd.lib" is missing else #include<iostream> cout is an undeclared identifier the only thing that adds Libcimtd is UseOldIO.h but _mt isnt defined so it shouldnt be accesed Can anyone help id apperciate it. Add the line: using namespace std; If this doesn't work then please state which edition and version of Visual Studio you are using. ...Show All
