dr.acv's Q&A profile
Visual Studio Tools for Office Is there a way to communicate between Word Document Addin & Word COM Addin in VSTO?
I have Word Document Addin in VSTO 2005, but I need to add some items to MS Word menu. I'm going to use Word COM Addin to add menu items, but it's going to be separate app. I'm not sure how can I notify Word Document Addin when state changed in COM Addin. What is the best way to do that Does Word provide any functionality to solve this problem Sorry, that I wasn't clear. >>It's not clear what you mean by "Word Document Addin". Do you mean a document-level VSTO project If you have VSTO 2005 SE, you can see it on New Project Dialog under "Visual C#" > Office and it called "Word Document" project. >>It's also not clear what you mean by "state ...Show All
SQL Server Exporting SQL DB files
i have a VB project utilising SQL server Express. I need to export the database files so that the user data can be copied to a laptop and made available to other users. My problem is this, connections are remaining open to the DB files even though I close all forms that include data access. Typically, my application takes around 6 minutes before the connections are released and the files can be copied. Is there a way of either forcing all connections to close or of exporting the DB while it has connections Rich I think this is exactly what's happenning, however, I am confused by your code - VS dosn't recognise it at all! Cheers, Rich ...Show All
Visual Studio 2008 (Pre-release) FatalExecutionEngineError 0x80131623
Hi I'm not expecting a solution to this but I am interested in hearing of other cases of this error. I have a TreeView that dynamically displays data from series of classes arranged in a master detail detail structure. All of the collections are ObservableCollections. An ObjectDataProvider and Hierarchical Data Templates are used to format the master and the detail, details.. Everything works really nicely with the bound data being shown in the tree and the tree exapanding as I'd like until..... I open a DirectShow.NET video window that uses a custom allocator presenter. This is hosted in the window using a windowsforms host wrapper. If the video is running, paused or disposed of (ie it doesn't matter what I do once I"ve shown it once ...Show All
Visual Studio 2008 (Pre-release) WCF - ServiceKnownType with embedded reference to a Type object
I am working on a WCF service which implements a ServiceKnownType that has an internal reference somewhere to System.RuntimeType down deep. Here is a reference implementation sample [code] [OperationContract] [ServiceKnownType("GetKnownTypes")] public void DoSomeOperation(ComplexTypeWithTypeReference myObject) { //do work } public static IEnumerable<Type> GetKnownTypes(ICustomAttributeProvider provider) { List<Type> types = new List<Type>(); types.Add(typeof(ComplexTypeWithTypeReference)); object o = typeof(object); types.Add(o.GetType()); //cant just use typeof(System.RuntimeType) because of protection level return types; } [/code] I have work through all the errors about System.RuntimeType bei ...Show All
SQL Server Trouble importing numbers from Excel file
I'm using SQL Server 20005. I'm trying to import an Excel file that has column with some values being exlcusively numbers and other values that are text. Before importing, I formatted this column as text in Excel. To import the data I'm using the SQL Server Import and Export Wizard. The problem: The wizard sets this particular field to nvarchar(255). This length works and the data type seems like it should too. But, when I complete the import, none of the numbers are imported - only the text. Where the numbers should be, it is null. No errors are given. I've tried changing to the data type to text, ntext, varchar but none seem to work - only the text is imported. Can anyone suggest how to get all of the data, both numbers and ...Show All
Audio and Video Development When is ready picture in pixelbuffer
Is it posible to check for a moment, when the picture is loaded to the pixel buffer and when can i start animation in script At the moment i am using a timer and for a short time waiting, but this is not an exact method. Kern, I see that clearly the answer I gave was wrong. I assumed that Content Layout would precede Script. Can you point to more resources that describe this (Spec). thx ...Show All
Game Technologies: DirectX, XNA, XACT, etc. how to change the current stream input ( vertices )
In the graphicdevice, they exist the property device.Vertices which is a collection, so we can put a lot of kind of vertex buffer in it. Very nice but ... How to say that the current stream is not the Zero but an other because the function drawnprimitive use the current stream and in my case it s always device.Vertices[0]. So if we cannot change the current stream what is the goal of the collection Vertices If you know how to change the current stream to take for example device.Vertices , can you explain it to me. PS : sorry but i am french and my english is not really perfect. ;) The vertex shader won't actually know where its vertices come from, it just has a set of input v ...Show All
SQL Server Diagram, script and security ...
Three things: 1 - I attached a database from another computer in the Microsoft SQL Server Management Studio Express tool. It looks like my database diagrams did not follow. At first, it told me that the owner of the database was not set correctly and, hence, diagrams could not be supported. I ran the following query to fix that -> Alter authorization on database::DB_NAME to [MACHINE_NAME\USER]. Now, I can create new diagrams but I would like to see the ones I had before. How can I transfer my database files (.mdf and .ldf) with the diagrams 2 – I would like to generate a database script that would not only create the table structure but also generate the insert statements to populate the database. When I use the ...Show All
SQL Server Primary/Foreign/Identity keys & Encryption
Hi all! I'm just getting my feet wet with how encryption works in SQL 2005. With regards to the encryption of primary / foreign keys, I'm not entirely clear on the best approach. Below are three examples of typical table structures I currently have: == Customers table == CustomerID (PK, int, Identity) CustomerName (varchar) == Orders table == OrderID (PK, int, Identity) CustomerID (int, foreign key) CreditCardNumber (varchar) == OrderDetails table (1 to Many) == OrderID (PK/FK, int) ItemNumber (PK, int) ItemDescription (varchar) The Customers and Orders tables use identity values as their primary keys. From what I can tell, CustomerID in the Customers table cannot be encrypted and OrderID in the Orders table cannot be encryp ...Show All
SQL Server Sum with 0 value
Hi, I have following problem with sql server reporting 2005. When i am doing =Sum(Fields!Speed30HP_Avg.Value) in Group row it showing #Error text. I have some 0 value in Fields!Speed30HP_Avg.Value field. I have tried IIF (IsNothing(Fields!Speed30HP_Avg.Value), 0,Fields!Speed30HP_Avg.Value) but still it not working and giving same problem. anybody have any solution Regards, Dinesh Patel Try to run the report using the "Preview" tab in Reporting Services. In the output window, you should be able to see the exception that the textbox is throwing. Most likely it is having trouble converting between different data types. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Custom Content Manager - Generics Question
Greetings & Salutations: I am trying to put together my own kind of "Content Manager" as the current one appears to only work with content that has been added to the project, and not with say, a file on a network drive somewhere. I really like how the "XNA ContentManager" uses generics, and was trying to implement it myself, but encountered some errors. I looked on the net but couldn't find the answer I was looking for. Basically, I would like to be able to fetch any kind of asset from my own content manager, regardless of what it is . The following function does not work as it is written. Could someone point out the proper way something like this is supposed to be implemented (PS. The content is stored in dicti ...Show All
.NET Development Failed to convert parameter value from a SqlParameter to a String.
hi i m using a stroed procedure and my and that strod prcedure is updating 3 tables i m passing 9 parameters to that procedure. when i set all parameters in my coding work of vb.net and call executenonquery it gives me following error "Failed to convert parameter value from a SqlParameter to a String." code is as folllows...please help mee in this regard strRowCount = CInt (strRowCount) + CInt ( "1" ) cmd = dbComely.GetStoredProcCommand( "sp_UpdateAndInsertStock " ) strStockTakingId.ParameterName = "@strTakingID" strStockTakingId.SqlDbType = SqlDbType.VarChar strStockTakingId.Direction = ParameterDirection.Input strStockTakingId.Value = Me .txtStockTakingId.Tex ...Show All
SQL Server Issue with SQL Parameter when used with % character.
Hi all, is there a known issue when using a SQL Paramater in a SQL string that uses a '%' character for wildcard string searches For example, if I used the following... SQLCeParameter pKeyword = new SQLCeParameter("@Keyword", SQLDbType.Char); pKeyword.value = "Some Text"; string strSQL = "SELECT * FROM tbl_Keywords WHERE (Keyword = @Keyword%)"; This just never returns and results. But if I run the query in a query analyser window replacing the @Keyword% with "Some Text", I get results. I guessing that the placing of the character '%' in the string is the cause maybe... so have you tried my suggestion earlier if you copy and paste your query into query analyzer or SQL management console ...Show All
Software Development for Windows Vista [Win32/Qos] Prioritizing empty TCP ACKs with Traffic Control API
Hi! Surfing the internet I encountered an interessting read at http://www.benzedrine.cx/ackpri.html . Now I'm trying to accomplish the same thing under Windows using it's Traffic Control API. Problem is I don't know how to correctly set up my patterns in the TC_GEN_PATTERN structure. The only ones which come with the SDK are IP_PATTERN and IPX_PATTERN , and IP_PATTERN is declared as: typedef struct _IP_PATTERN { ULONG Reserved1; ULONG Reserved2; ULONG SrcAddr; ULONG DstAddr; union { struct { USHORT s_srcport,s_dstport; } S_un_ports; struct { UCHAR s_type,s_code; USHORT filler; } S_un_icmp; ULONG S_Spi; } S_un; UCHAR ProtocolId; UCHAR Reserved3[3]; } IP_PATTERN, *PIP_PATTERN; Now, according to the TCP ...Show All
Visual Studio Express Editions number of the week of the current month
Hi, How Can we caliculate the number of the week of the current month. For example to day date 18/sep/2006 so i need the result should be like 3rd week thanks Try this: Dim myCI As New System.Globalization.CultureInfo( "en-US" ) Dim myCal As System.Globalization.Calendar = myCI.Calendar Dim time As DateTime = Now Dim rule As System.Globalization.CalendarWeekRule Dim firstDayOfWeek As DayOfWeek Dim returnValue As Integer returnValue = myCal.GetWeekOfYear(time, rule, firstDayOfWeek) MessageBox.Show(returnValue.ToString) ...Show All
