Netmaster0000's Q&A profile
Visual Studio 2008 (Pre-release) Syncrhonizing an 'Order'
Hi, I'm not sure if Synchronization Services can help me but I hope so. Suppose I create a new an Order in the client side. It has header and lines. When I synchronize with the server I need two things: - I need to be sure the header and the lines are inserted in the same transaction. - I need to validate the Order. Even if it was valid in the client side, I need to be sure it's valid before inserting it in the main database. Can this be done with Synchronization Services Thanks Thanks Rafik, Next question. Suppose I have an 'Orders' class, with header and lines, and I want to use that class to persist the changes to the database. I want to use the synchronization framework to know ...Show All
Visual C++ Declaring a delegate
How can I declare (not define) a delegate as if I declare a class Semantics, really. What you've done isn't defining a delegate, but rather declaring it. To create a delegate of the above type, you could state e.g. SomeEventHandler^ myEventHandler = gcnew SomeEventHandler(methodWithDelegateSignature); ...Show All
.NET Development Dynamic Definitions
I have data in 2 data stores, a SQL Server and a Visual FoxPro container and I would like to dynamically get the connection and adapter based on a variable. In other words, the following code: if (dataOrigin == "SQL" ) { string strConnection = proProperties.SQLConnection; SqlConnection hConn = new SqlConnection (strConnection); SqlDataAdapter oAdapter = new SqlDataAdapter (lcSQL, hConn); } else { string strConnection = proProperties.VFPConnection; OleDbConnection hConn = new OleDbConnection (strConnection); OleDbDataAdapter oAdapter = new OleDbDataAdapter (lcSQL, hConn); } try { hConn.Open(); } catch ( Exception ex) { return rtnDS; } The com ...Show All
Software Development for Windows Vista About IGraphBuilder::AddSourceFilter
I am confused the first parameter of AddSourceFilter. Why is there a file to load and where is it If I want to capture video and render it to a monitor in realtime, is there stream only It seems there is not a file to be added. IGraphBuilder::AddSourceFilter docs say: "The AddSourceFilter method adds a source filter for a specified file to the filter graph." So it is for loading files. If you want to capture or preview from a device see SDK topics: Previewing Video Capturing Video to a File or the DVapp and AMCap SDK samples. ...Show All
Windows Forms Selecting multiple rows using dataGridView CheckBoxCell
Hi, I would like to allow the user to select/deselct multiple rows by checking/unchecking a checkBoxCell. For eg. if the user selects 4 rows and then checks/unchecks one of the checkBoxCell in the checkbox column, the all the other 4 rows' CheckBoxCell should get slected/unselected as well. The columns are checkboxColumn TextBoxColumn TextBoxColumn The behavior I want is similar to the 'Choose Toolbox Items' Dialog in Visual Studio. Thanks. ...Show All
SQL Server Create Directory with a File System Task
Hi! I'm having a bit of a problem implementing a File System Task to Create a directory and would appreciate some help if possible. I want to create a date directory so I can move files to once they are imported successfully. The date portion for the directory comes from the import file whose name is variable and in the format of PerfLog_<yyyymmdd>.aud. So, in essence, if I am processing a file named Perflog_20060913.aud, when I am done processing it I want to create a directory c:\myprog\20060913 and move my processed file there. Can anyone help me Please. Are you using a Foreach Loop Container to go through your flat files If your variable contains the wildcard character, it sounds l ...Show All
SQL Server Store FILES in SQL Express 2005 with VB.NET
Hi, I'm a beginner with VB.NET and SQL and I would like to store files (like Images, Document...) in a Table of SQL but I have no idea how to do it. This is my connection string, and examples of how I do queries, please help me... Private cn As New SqlClient.SqlConnection Private cn2 As New SqlClient.SqlCommand cn.ConnectionString = stringa cn.Open() cn2 .Connection = cncn2 CommandType = CommandType.Text Dim ESEGUI As String cn2 .CommandText = "INSERT INTO users (nickname) values ('Paolo') ESEGUI = cn2 .ExecuteNonQuery() Dim oDr As SqlClient.SqlDataReader cn2 .CommandText = "SELECT * FROM users WHERE Nickname like 'Paolo '" oDr = cn2 .ExecuteRe ...Show All
Visual C++ VC++ 2005 redistributable (vcredist_x86.exe etc.)
Hi there, I noticed that the Beta 2 redistributable is hosted on the Microsoft download library, but the final ones seems not to be. Will it be hosted on microsoft.com (or is it already somewhere ). Also, it has been reported to me that on Windows 2000 the (RTM) redistributal gives an unuseful error message if Windows Installer 3.1 is not installed. The message is error 1723. "A DLL required for this install to complete could not be run." . It would be a lot more helpful to my users if this was a more informative error message - the solution of installing Windows Installer 3.1 was only found by trial and error. Thanks. I agree, in a perfect world Microsoft would revisit this and eliminate the possibl ...Show All
Visual Studio 2008 (Pre-release) Overlapping elements over a FlowDocument
Hi, I have a FlowDocument with sections, paragraphs, lines, etc. My target is (for example) to draw two lines in order to create a cross over the page (from angle to angle) so that the lines overlaps the entire page content. Another example is to overlap a big text like "Confidential" over (or behind) the content page. I tired using floaters but they need to be inside an inline, so they take space and modify the flow of the page. I want to overlap those elements without changing the normal flow instead. Thanks, Raffaele Hi Lester, thanks for your answer but Adorners need to be created programmatically (afaik) so I cannot describe the line cross or the "confidential" directly in xaml. I need to create a ...Show All
Community Chat Zune Subscription
I've been scrounging around online and thought I might be able to get a definitive answer here. Currently, I have Napster-to-go with my Dell DJ. The DJ is on it's way out the door, and I'm looking at getting a Zune. Will this Zune subscription thing for 15 bucks a month allow me to transfer music to the player itself, or is it simply to let you listen to music on your computer In other words, will there be something like napster-to-go that works with the Zune TIA! I'm really confused about the Zune Terms of Service, specifically section 14, Content Usage Rules. The way it reads, it sounds like I will lose access to any content purchased during my subscription if I end my subscription. For example, I buy ...Show All
SQL Server problems executing a SELECT inside a TRAN against other computer
Hi I have a problem executing a SELECT inside a TRAN against other computer For example: IN THE SQL Query Analizer of the COMPUTER2 1) this runs OK BEGIN TRAN SELECT * FROM COMPUTER2.DATABASE.DBO.TABLE COMMIT TRAN 2) this runs OK SELECT * FROM COMPUTER2.DATABASE.DBO.TABLE 3) this runs OK SELECT * FROM COMPUTER1.DATABASE.DBO.TABLE 4) this runs bad BEGIN TRAN SELECT * FROM COMPUTER1.DATABASE.DBO.TABLE COMMIT TRAN The problem is that TABLE locks and it does not finish. I've been looking for similar ERRORS in Microsoft Support but I found nothing I've uninstall and install de SQL server 2000 SP4 and the problems continues the same Please, someone could help me, thanks Assanta: A couple of things: (1) make sure that DTC is ...Show All
.NET Development ASCII value
how can I return the ASCII value of string... I think it is good answer but it makes another problem to me because operators like > and < cannot be applied to operands of type byte[] ... so what is the solution hee is my code public bool IsArabic( string strCompare) { int i; string strTemp; for (i = 1; (i <= strCompare.Length); i++) { strTemp = strCompare.Substring((i - 1), 1); byte [] val = System.Text.Encoding.ASCII.GetBytes(strTemp); if (((val > 1575) && (val < 1609)) || (val == 1575) || (val == 1609)) { return true ; } else { return false ; } } } if you solve me this problem ...Show All
Visual Studio Express Editions printing multiple worksheets
The following works for mew to print a worksheet named "totals". But I don't know how to print multiple worksheets. Dim printer As String printer = oExcel.ActivePrinter() Worksheets( "totals" ).PrintOut(from:=1,to:=1 , Copies:=1, Preview:= False , activeprinter:=printer) I've tried: Worksheets( "totals" )("numbers").PrintOut(from:=1,to:=1 , Copies:=1, Preview:= False , activeprinter:=printer) & Worksheets( "totals", "numbers").PrintOut(from:=1,to:=1 , Copies:=1, Preview:= False , activeprinter:=printer) please help!! Put in a loop or call individually - in this example I'm previewing but seems to work just f ...Show All
Visual Studio A data source instance has not been supplied for the data source
Using the same ReportViewer control for multiple reports. Using local reports in winforms app. I have a main form and then another form specifically for reports that contains only a Reportviewer control. I have a couple of rdlc files and if I configure the Reportviewer at design time it works for the report that I configure it for. But if I set the ReportEmbeddedResource or ReportPath to a different report I get the following error: A data source instance has not been supplied for the data source 'PhonesDataSet_PhoneDbView'. The reports use the same dataset but different tables. Both BindingSources and TableAdapters are added to the reports form. Any suggestions appreciated ... Also, for the printing problems there was a KB 916 ...Show All
Visual C++ MFC CMutex member and const functions
I have a class with a CMutex member in a class to do synchronization. If I declare a method const I would get an error when trying to lock the mutex from within that function. What's the recommended way to handle this Not declaring it const feels like bad form. error C2664: 'CSingleLock::CSingleLock(CSyncObject *,BOOL)' : cannot convert parameter 1 from 'const CMutex *' to 'CSyncObject *' ...Show All
