meco3hp's Q&A profile
.NET Development Windows Form to Windows Form Communication
Where can I find out how to send some text in a label control on a windows form, for example, to a textbox in another windows form, which has the focus At the pointe where you want to exchange that data you need access to both forms through a forms reference. Maybe the current code is in a form method and you have a varibal otherForm available at that point. Then make sure that the control you want to access of otherForm is declared public. By default the designer adds them as private. Then you can call this: this.someLabel.Text = otherForm.someTextBox.Text; To not expose the controls directly you could add also public Methods or Properties to read or modify the controls contents. So you might ad ...Show All
SQL Server WHERE clause
Hello. I have a database that a client set up that's kind of a mess, but I need to pull records from it. Is it possible to use a WHERE clause with an array The SQL I am getting is really messy, kind of like SELECT Title FROM Master WHERE Cat1 = leg OR comm OR err OR and so on... OR Cat2 = leg OR comm OR err OR and so on... there are multiple categories for each record in the table, with subcategories under main categories. But he only has one record in the table with all of these categories specified. Any help is much appreciated. MarcD wrote: select columns from table where col1 in (comma, delimited, set) or col2 in (another, comma, delimited, set) Hope this helps. bill and cl ...Show All
.NET Development Step By Step explanation of the .Net Remoting
Hi All, I am the novice in the .Net Remoting i have read about the remoting but its confusing me,So can any one tell me the explanation of the Remoting along with code. Thanks That's a tall order - you can write an entire book on the subject. How about this: in order to make it possible for someone to help you without writing a whole book, why don't you explain everything you have understood so far about remoting, and highlight the areas currently confusing you. This will make it possible to write you an explanation that takes into account where you've got to so far, and that directly addresses the areas you most need explained right now. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. No typedef and no Include. . .
Are these VBA programmers writing the .Net framework and languages Many of you probably already know this, as I'm arriving late to the party. I wanted to use the typedef equivalent but apparently not in C#. Then of course I thought I'd try the #include -- maybe so, if I wanted comments (I gather). The end result: Common.cs using System; namespace <yoursHere> { using ID = System.Int32; public class objID { private ID itsID; public objID( ID theID ) { itsID = theID; } public ID ID { get { return itsID; } set { itsID = value; } } } } Did I miss something Why not just: class AClass { public uint itsID; } The reasons why you need ty ...Show All
SQL Server Derived Column / Change date format
Hi, Is there a way using a derived column transformation to change the format of the date eg: The input flat file's date is in yyyy/mm/dd and i need to convert / change this to yyyy/dd/mm Is this possible Thanks in advance, Slash. The weird thing is that the original flat file date is all yyyy/mm/dd but when it comes to import into the database as datetime. It inconsistently changes the format of the date some dates appear correct and some appear as yyyy/dd/mm. Is there anyway to over come this / have you heard of anything like this before Thanks for the replies, Slash. ...Show All
Visual Basic IDE Question
I'm trying to develop a small web service that requires a connection to a SQL database. My problem is not with SQL. My problem is how to use the drag and drop capabilities to add SQL connections, datasets, etc to the web service when there is no form or other visible interface on a web service. There must be a way! I've started a web service project, then created a connection to the database but can't drag tables or anything to the web service because there seems to be no where to drop them. What am I missing Hello, Try adding a Dataset (Project menu - Add New Item) to your web service. Then you can use the Dataset Designer to configure your data... Hope that helps. ...Show All
Visual Basic get { return (int)this["Attribute1"]; }
Is the following the equivalent vb.net Get Return CType ( Me ( "Attribute1" ), Integer ) End Get Thank you, -greg what are you trying to access in "me" The syntax is not correct. get/set properties are defined as this in VB.NET: public property TheProperty() as Integer get 'your stuff here end get set(byval value as integer) 'set value here end set end property ...Show All
Visual Basic can't see database
When I go to "add connection", my server name comes up home, but it shows no databases in the "connect to database" area Which version of the Product are you using VB 2003/ 2005 / Express. What type of database are you trying to access, SQL, Oracle, SQL Express ...Show All
Visual Studio Express Editions Adding SQL (express) database to VB (express)
G'day, I'm having a problem adding an SQL database to my project. Whenever I try to add the SQL database, I get the error message: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified). I went into SQL Server Manager and enabled all the protocols (Shared memory, named pipes etc)(as some similar solutions had that as the solution) but that didn't work. I'm running Windows XP using SQL Server 2005 (express) and VB 2005 Express.... Any help would be appreciated! Talos, I am hap ...Show All
Visual C# Compile with specific assembly version?
Hi! Is there a way to manually tell what version of a referenced assembly must be If I right-click on the reference and then set the property "Specific Version" to true, I still can't choose version for the "Version" property. What I can do is open the csproj file in notepad and type in the version I want, but I would like to be able and do this from within the IDE. Also, I don't want to be able to compile if I don't have the right version, so I guess if there is some thing I can set in the .config file it's not going to work, because then I will get a runtime exception, not a compile error. Regards /Tommie Thanks for your answer. I'll think the solution with copying assemblie ...Show All
Windows Forms How do I disable the MenuStrip's ALT-key action in C#?
How do I disable the MenuStrip's ALT-key action in C# I would like to use the alt-key for an alternate character set in a RichTextBox. Currently every time I press the ALT-key it selects and deselects the menu's shortcut mechanism. Thanks, schmighty Hi, schmighty Just override the ProcessDialogKey in your form, as: protected override bool ProcessDialogKey( Keys keyData) { if ( (keyData & Keys .Alt) == Keys .Alt ) return true ; else return base .ProcessDialogKey(keyData); } Hope it helps. Best Regards. Ye ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Unable to share a windows game - Followed the instructions on the manual
Okay, so I finished my first game using XNA Game Studio Express, it has been only a few days since I installed it, and it has been quite easy, having experience at making games. Now, I want to show this game to my friends, so I send it to a couple of them (both of them have XNA Game Studio Express installed), and it works great. Now I want to show it to some other friends, these who do not know what making games is about, these who do not have XNA Game Studio Express. I ensure they follow these instructions, from the manual: Sharing a Windows game On Windows you need to distribute your game executable and any content required by your game. In addition you need to ensure that the user has the following redistributables installed ...Show All
SQL Server how to get a variable value return back from a child package ?
I have a parent package (i.e. P) and a child package (C). I was able to easily pass a variable value from P to C. And C did computations and get a result (i.e. integer) and stored this integer to a variable (x). Now I want the value of "x" to be passed back to P and store in P's variable (say Px). Anyone knows how to Thanks Steve Thanks for helpful info. Now, if I want to write a dynamic query for the sqlStatementSource expression of "Execute SQL Task" and wish to use a user-defined variable (i.e. User::Age) inside the child package, I must define/add this "Age" variable into the child package. For instance, I have this query: " select * from Employee where age = " & [User: ...Show All
Visual Studio Express Editions Newbie ADO.NET Problem
Hi, I have begun to learn visual c# express using Absolute Beginner’s Video Series My problem is with Lesson 9: Databinding Data to User Interface Controls ... I have downloaded and compiled the project without problems. When my application is running and i click on the SAVE button seems that the database it is brought up to date, but if i close my application and restart it i see that no changes are made on the DB. I have checked the DB using the SQL Server Management and i have seen that no data were inserted into the table. I don't understand what is the problem... any ideas Thank in advance for the help! Kenshin Check this thread ... ...Show All
SQL Server Merge Replication error while applying Snapshot
Hi, i am getting the below error while applying running the Synchronization agent for the Subscriber. I have created replication topology with one central server and one subscriber. Here central server has windows server 2003 and subscriber has windows XP. Both are having SQL server 2005. After creating the merge subscriber, i am runnnig the Synchronization agent manually for the first time. While running that i am getting below error. Anybody aware of this error. 2006-06-24 00:26:00.175 Applying the snapshot to the Subscriber 2006-06-24 00:26:02.722 The schema script 'D_NUM_7.sch' could not be propagated to the subscriber. 2006-06-24 00:26:02.784 Category:NULL Source: Merge Replication Provider Number: -2147201001 Message: The schem ...Show All
