CoyoteTech's Q&A profile
Silverlight (formerly WPF/E) error handling?
When a XAML element has an attribute that it doesn't support, nothing renders and there's no alert. I also tried specifying my own error handler, instead of the null argument in the new agHost(...) call. That wasn't called either. I hope this isn't the intended behavior, because it sure makes debugging difficult. If that's not the normal behavior, could someone suggest how I can get it to work, or at least allow it to render the whole XAML document ignoring the offending element Actually, I would expect that both the error handler would be called and everything else would be rendered and the offending attribute would be ignored. Perhaps the non-rendering behavior is due to over-zealous validation, but I don't think that is a wise ...Show All
Visual C++ contextual help with Visual Studio
I'm using Visual studio 6.0 for C language. I also have MSDN library install on my computer. I would like to know how to configure Visual studio to call my MSDN library when i select an error compilation message and calling the help system by pressing F1. For VC6.0 issues, please use the newsgroups at http://mail.microsoft.com/newsgroups . The forums are specific for VC2005 issues. OTP Thanks, Ayman Shoukry VC++ Team ...Show All
Visual C++ Connecting Access database vis managed code via ADO.net.
Hi; Could someone point out my code error here. When I try to compile I get a C2065 OleDbConnection undeclared identifier error msg. Here is my code: #using <mscorlib.dll> #using <System.Data.dll> using namespace System; using namespace System::Data; using namespace System::Data::OleDb; #include "stdafx.h" int _tmain(int argc, _TCHAR* argv[]) { // The connection //string cnNwind; OleDbConnection * conn = new OleDbConnection(); conn->ConnectionString = S "Provider=Microsoft.Jet.OLEBD.4.0; " S"Data Source=C:\my_databases\taxLots.mdb"; // The connection string try { // Open Database conn->Open(); Console::WriteLine(S"Connected to database successfully ...Show All
.NET Development Logging Data Truncation While Using SQLBulkCopy
Hi, I am using SQLBulkCopy class of .Net 2.0 to copy data from excel to SQL 2000 database. My problem is that I want to log records whose data was been truncated as the field length in the database was not sufficient enough to hold data present in the excel file. For example suppose there is a column called 'Employee Name' in the database as varchar (30) now if I try to insert data using SQLBulkCopy class from excel file having data of more than 30 characters for some rows then somewhere I want a log which helps me to identify that row number 10 & column number 20's data was truncated due to field length. Thanks & Regards, Pritesh Shah The ideal way to do this would ...Show All
Game Technologies: DirectX, XNA, XACT, etc. How make a DirectX app runs on Windows Forms (using C++)
Well, i'm making a simple directX application based on my studies on this book Introduction to 3D Game Programing with DirectX 9.0 , the problem it's how i make the scene created runs inside a windows form to be more clear, i'm trying to render my scene inside a form but don't know how call a specific function to do that. Another thing, the code i'm posting here create by itself a window and i know that to runs on windows form i'll need erase thoses line of code, 'cause that i needed know how do that using a windows form. I'm using native C++ language and the code of the program i trying to run is down below. Thanks for any help (i really need do that). xfile.cpp #include "d3dUtility.h" #include <fstream> #include ...Show All
Windows Forms OWC in a windows forms app?
Hey all, I know this may seem strange, but is there any reason I can't use an office web component in a windows forms application Alternatively, can someone suggest a way i can display pie charts / bar graphs etc... in a winform app without using the OWCs Thanks! There are many great chart components, but they are really expensive. Comparing them with chart from office is not an issue, believe me. I can give some of them that rocks: DundasChart, StockChartX, DotNetCharting. ...Show All
Visual Studio Team System CTP7 BUG - Database Role Membership is not Compared
I have created a custom database Role with grants and denies in the securables and one Role Member. When I do a schema compare the role membership is not considered regardless of the settings of the IDE (schema settings, project settings). When updates are written the role is created and the grants and denies are written (the latter if ignore permissions is not checked). HOWEVER - 1. The membership is never written meaning the user is stranded without a role membership. I assume that the SQL for this should appear in the RoleMemberships.sql but it doesn't. AFAIK there are no UI Settings that affect this behaviour (ignore permissions on or off has no affect). 2. The SSMS UI view of the role does not show the securables or the schem ...Show All
Visual Basic FTP Example
Hi, I am new to FTP things.I never used any FTP in my project. Now i need to send some text files(which are in my project directory) to clients using FTP. I have clients ip address and password. What factors i need to start for FTP. I need a basic idea.I found some examples in google.But those are not basic ones. Can anybody help me with basic example to upload files. Thanks VBE_programmer, Making any type of FTP requests can be broken down into six steps: 1. Create a web request for a URL. 2. Set the login credentials (username, password). 3. Set the required options and the action to perform. 4. Upload data required (not used by some actions). 5. Download data or results (again, not used by some actions). ...Show All
SQL Server sp_xml_preparedocument VS nodes()
I am considering converting a stored proc which uses sp_xml_preparedocument to a select using the node() syntax. I made two sql scripts, one of each method with identical input xml and ran a query plan on each of them. To my surprise, the Sp_xml_preparedocument seemed to produce the better query plan. The Estimated subtree cost for sp_xml... was 3.36433 for 10000 rows and the estimated subtree cost for nodes() was 421.126 for 60 rows. Am I missing something or is sp_xml_preparedocument still the best method to shred an xml document sp_xml code: DECLARE @idoc INT , @trans_id int , @after_doc xml , @record_type int , @sm_session_id nvarchar ( 50 ), @trigger_start_time datetime , @user_id int , @fo ...Show All
Visual Studio Express Editions How to make settings for your application
Dear Gurus, Please help me on how to make my application settings remember what has been changed in the application before closing it. One example is the radio buttons, check buttons and textbox contents. During initialization, the application should read the last settings and apply it on run time. Thanks in advance peeps Use My.Settings Simple example to save the content of a textbox and reload it on startup. Go to Project | Properties. Under the settings tab create a new setting called TextBox1Content. Leave it at the default type of String. Add the following code to your project Private Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing My.Set ...Show All
SQL Server Creating a UDT Type with create assembly
I created a UDT Type (using MS Server Express Edition and Visual Basic 2005 express) but I get some errors: Msg 6556, Level 16, State 1, Line 6 CREATE TYPE failed because it could not find type 'UDTProj' in assembly 'UDTProj'. Msg 6597, Level 16, State 1, Line 6 CREATE TYPE failed. That is my code: Public Structure UDT_interval Private adresse As String Private beginn As Date Private ende As Date End Structure ************in Transact-SQL //register the UDTProj assembly USE TestData; CREATE ASSEMBLY UDTProj FROM 'C:\MS Visual Studio\MyOutput\bin\Release\UDTProj.dll ' WITH PERMISSION_SET = SAFE; // create the UDTProj type CREATE TYPE dbo.UDTProj EXTERNAL NAME UDTProj.[UDTPro ...Show All
SQL Server Advice on query
Hi, Quite possibly this is easy but my brain is bazango'd right now and for the life of me I can't think of a good way to get the following... I have a table with 4 columns ID (int) User (varchar(200)) Timestamp (datetime) Note (text) The ID, User, Timestamp make up the primary key and nulls are not permitted in any column I'm trying to select the top 3 most recent rows [using timestamp] for each ID. anyone thanks in advance Mac Hi, That should be worth a try for the original poster: SELECT * FROM SomeTable ST WHERE Exists ( SELECT TOP 3 [id], [user],[timestamp], --you should not use reserved words for column names From SomeTable Subquery Where Subquery.[id] = ST.[id] ...Show All
Visual Basic Count lines in a textbox
Can someone help me couting lines in a text box In Access i use this code: im strText As String Dim nLines As Long Dim antallinier As Long antallinier = 16 Dim antal As Long Dim tilbage As Long strText = Form_kursus.hovedpunkter.Text & vbNullString ' Trim of trailing CR/LF, if any. If Right(strText, 2) = vbCrLf Then strText = Left(strText, Len(strText) - 2) End If ' Split on the CR/LF combination to see ' how many lines we have. If Len(strText) = 0 Then nLines = 0 Else nLines = 1 + UBound(Split(strText, vbCrLf)) Hope some can help regsrds alvin the "s" is meant to be the string you are using ... such as the textbox text value. However you can also use this to get t ...Show All
Smart Device Development How could I lock and unlock the keypad on smartphone
Hi, I'm writting a program that have to lock the keypad when it is inactive and can unlock the keypad by pressing a single key.But how can I do that,Is there any APIs Thx! BOOL EnableHardwareKeyboard(BOOL bEnable ) will allow you to disable and enable the keyboard. As for getting it to come alive again, you'll only be able to press certain buttons, ones that won't be blocked by disabling the hardware keyboard. Things like the call buttons shouldn't get blocked, so you'll have to catch these button presses to enable the keyboard again. I'm not positive how to do that, I guess you could RegisterHotKey one of those buttons, but I don't the virtual key codes (or if you are allowed to). ...Show All
Visual Studio Express Editions image converter
Roughly, what code do I need to make a simple image converter, say, from .jpg to .bmp I was thinking maybe looping through the images in a folder and converting it to the type... but how would i do that Just for your opinion on the code you would use. Code please (if you can). Send the following Sub your InputFileName, your OutputFileName, and your OutputImageFormat. Sub ChangePictureFormat( ByVal InputFileName As String , ByRef OutputFileName As String ) Dim FileImage As Image = Image.FromFile(InputFileName) FileImage.Save(OutputFileName, Imaging.ImageFormat.Bmp) End Sub ...Show All
