Josh Smith's Q&A profile
Windows Forms How to create an instance of System.Windows.Forms.AxHost.State ?
I am writing an user control, it would add the ActiveX control by checking the installed version of Office Web Component SpreadSheet (currently there are OWC11, OWC10, OWC components). After checked the installed version of OWC, I create the instance of the axXXX library which generated by vs.net 2003 & add this instance to UserControl.Controls. If I do nothing more then it would be OK, but I wish to set the CSVData property of the instance after the constructor of the UserControl finished. I got an error said that OcxState of the OWC instance is valid. I noticed when I drag & drop the OWC control into the UserControl, the designer would generate the code such as : owc.OcxState = ((System.Windows.Forms.AxHost.State)(res ...Show All
Visual Studio 2008 (Pre-release) EDM Serialized Form
Again from the Next Gen paper, within "Build the Conceptual Model" we have some very strange "Schema" definition that uses some of the concepts of Xml Schema (Schema root elements and ComplexTypes) but seems to be some loose variation of it. If this just an "example" or is this the way things are intended to work What about SQXML mapping techniques Particularly for Bulk Upload etc you already had to do something much like this, with some metadata added. I can only imagine if you are not using Xml Schema there must be a good reason behind it, albeit things may have progressed since that paper. steven http://stevenR2.com It is a fair question to ask why the Entity Data ...Show All
SQL Server SQL CE 3.0 SQL Server 2005 Mobile Edition Database Password Problem
Hi, I was wondering if someone could help me as this is a bit of a puzzle. I have created a database using a password, the create table scripts are executed successfully using the connection string however when I try and use the same connection string to insert some data into the database an error is produced, with the following message 'The specified password does not match the database password'. I have opened the database using the SQL Server 2005 Management Studio and provide the password and I can access the database without a problem. When the connection object is first instantiated all the Connection String property, the connStr variable and the modifiedConnStr are all correct (by this I mean that the data source and the ...Show All
Visual Studio Express Editions Known Bug In VB2005 Express??
Hi All, I think I have found a bug, but I have no idea who to tell or what to do, so I'll put it here & hope for the best :) In my application, I have a combobox and a text box on a form. In the "ComboBox1.TextChange" (which used to be & should still be, in my opinion, "ComboBox1.Click" in Legacy VB) I use the Microsoft.VisualBasic.Replace command to alter a part of the textbox.text. (VB2005 Express does not do "Replace" natively, or does it ) I populate the combobox1 in my form.load & set the textbox.text in the same routine. Now, here's where the "bug" (I *think*) comes in: If I populate the combobox as my *LAST* move in the form.load routine, VB2005 Express insists upon doi ...Show All
SQL Server Error when using a stored procedure in OLE DB source
I am trying to use a stored procedure in the OLE DB source, I am using the SQL Command for the Data Access mode. It returns values when using the preview but when I test the package I receive the error, "A rowset based on the SQL command was not returned by the OLE DB provider." For the the connection manager I just have a basic connection to the Sql server and then I am using the SQL command for the data access mode. The connection manager does work when I use other access modes like the table and view option. ...Show All
Visual Basic Databases and Textboxes
Part A How do I link textboxes to individual database records when the database has say fifty rows and fifty columns. The idea being to display and maintain a database with textboxes on a form that stand independent of each other that point to a specific spot in the database. Part B Once this is possible then .. To be able to manage this data based on years meaning... I would like to have this basic setup but I am able to have the database represent a set of data for a particular year and I would be able to choose to display data based on the year. Please, if anyone knows .. respond asap.. Thanks Shihan ok please, how do I get to update the database with these direct linked t ...Show All
SQL Server sql log files can not increase?
Database's log file can not increase when nearly get 2 GB Mine is sql server2000,What's wrong with this Any idea about this Thanks Do you really need such huge log files Or did you just forgot in the past to shrink these files HTH, Jens K. Suessmeyer. --- http:://www.sqlserver2005.de --- ...Show All
Windows Forms Mouse coordinates in CellMouseClick event
Hi I want to display different ContextMenuStrips depending in which cell the user right-clicks. Since I'm using an unbound dgv I can't use the ContextMenuStripNeeded event (is this correct ) so I'm trying to just simple show the ContextMenuStrip programatically. My problem is that the DataGridViewCellMouseEventArgs only return the location of the mouse with the current cell not within the dgv itself. Is there any way of getting the mouse position within the dgv when using the CellMouseClick event Cheers, Pedro I solved my problem by using the dgv mousedown event and then getting the cell by the HitTestInfo method in the dgv class. I can then use the mouse coordinates from the mousedown event to position t ...Show All
Visual Studio 2008 (Pre-release) RichTextBox font change without selection in VB
Using Visual Basic Express, I'm trying to change font at an insertion point in a RichTextBox in an XAML flow document so that any characters typed after the font change are in the new font. When text is selected, the change is easy, using something like: s.ApplyPropertyValue(TextElement.FontFamilyProperty, FontFamilyListBox.SelectedItem) etc... If I do it when the selected text is empty, the word at the insertion point is changed. I've tried just keeping track of the desired font and applying it to the first new character typed (as long as the insertion point has not changed), but I either end up getting the formatting to apply only to that new character and nothing following it, or I end up with the new character selected and then b ...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
.NET Development static variable declration with CodeDom?
I have been unable to declare and initialize a static variable with CodeDom. What I would like is: public class foo { private static string fooName; . . . . } Have I overlooked some some combination of CodeDom classes or is this not possible Thank you. Kevin CodeMemberField field = new CodeMemberField ( typeof ( string ), "fooName" ); field.Attributes = MemberAttributes .Static | MemberAttributes .Private; This code should create a static field. Michael Taylor - 1/25/07 http://p3net.mvps.org ...Show All
Visual Basic Problem With A split function and a Regex Validator
I suck at programming and i have a few problems here. Hope some kind soul can save me Firrst, i have a textbox to allow users to input related hyperlinks. Therefore, users are to enter the links lik this in the textbox. http://www.yahoo.com,http://www.asp.net However, when some1 clicks on the link, it appears http://www.yahoo.com,http://www.asp.net in the address bar. Can some1 teach me how to seperate this 2 sites so that it appears http://www.yahoo.com or just http://www.asp.net in the address bar How to seperate them The text box is a single line text box. Secondly, the websites have to input with this format http://www.yahoo.com . can anyone tell me how to detect whether the user has input the website with the ...Show All
.NET Development Adding files to ClickOnce VB.Net application
I have two problems with my ClickOnce VB.Net application: Is there a way that one can specify a default location where the application should install How do I get the path to location of the applocation once it is installed on a clients pc The problem is that my program reference some compiled help files and an access database and need to keep track of where these files will be located once installed. I am using Visual Studio 2005 to publish the app. you mean i can hard code the application path if so, which form i should put web.config or form1 and what is the coding many thx hunb ...Show All
.NET Development How to redeploy the .NET Framework with my application?
So you’ve spent some time creating the next stupendous.NET Framework application. Now what Applications that were built against a . NET Framework need the corresponding/compatible .NET Framework runtime installed on the machine that will run the application. To do this effectively, please reference the following guides for deploying the .NET Framework with your application: .NET Framework Version 3.5 Deployment Guide http://msdn2.microsoft.com/en-us/library/cc160716.aspx .NET Framework Version 3.5 Admin Deployment Guide http://msdn2.microsoft.com/en-us/library/cc160717.aspx .NET Framework Version 3.0 Deployment Guide http://msdn2.microsoft.com/en-us/library/aa480173.aspx .NET Framewor ...Show All
.NET Development winxp service in c#
services are suppose to run before a user logs in right i have a tcplistener socket that is suppose to accept incoming connections, the computer could have a wired or wireless nic. what service should mine depend on so that network connectivity is available if either of the nics are used i do not want to depend on the "wireless zero configuration" service on the wireless nics and something else entirely on the wired nics, something universal is what i am looking for. what am i missing that will make my service work here is my configuration code in c# [ RunInstaller ( true )] public class ClientInstaller : Installer { &nbs ...Show All
