Tim Mostad's Q&A profile
Visual C# How to make a method in a windows service.
I made one windows service and i can control the OnStart, OnStop. example protected overwrite void OnStop() { //DO something } my real question is, how to make an own method in windows service and how do i send a string to it.. i would like it like this public string getPass(string tempUser) { string tempPass = ""; //do something do something, return tempPass; } anyone who knows where i can read about this stuff please contact me.. Is this for something external to the windows service If so you can use remoting or use a socket to communicate with i ...Show All
Visual Studio Express Editions database saga
I am at my wits end. I am trying to create a program that will add users to a database. I have read the various posts regarding the output file and have changed the Copy To Output File to Copy Never. I have also tried Copy If Newer. The database still does not retain my changes/additions. The code I have used is shown below. Code Here... Private Sub AddUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddUser.Click Dim newUserRow As Database1DataSet.Table1Row newUserRow = Me.Database1DataSet.Table1.NewTable1Row newUserRow.Name = nameBox.Text newUserRow.Password = Password.Text Da ...Show All
Windows Forms Help with Timer control
I want to make my program wait half a second until it will continue and I don't know how can I do it. I managed to stop it for a second but I can't stop it for a shorter time. Please help Thanks vbasics and feline for your answers but the answer of vbasics workd for me. ...Show All
SQL Server Connecting SQL2000 problem
Hi All, I have a sqlserver 2000 & 2005 both installed on same server with the instance name as servername\sql2000 and servername\sql2005. When i try to connect the sql2000 database from dotnet2002 or 2003, It comes up with an error as sql server doesnot exist or access denied but when i tried with dotnet2005, i am able to connect it. I guess it has to do with an dotnet framework 1.0 & 1.1 but i am not sure where to look for it. Can someone please point me to right direction Thanks Shaik Nagul on the client, check that the TCP protocols are enabled using the Client Network Utility (cliconf ...Show All
Visual Basic Combo box entry
I placed a combobox on my windows form to present a list of strings that can be selected, however, I would like the user to have the ability to enter any string they may choose. The attached code takes whatever is chosen and prints it in a messagebox. It works great except for the -1 index. How can I accept a string that is input Public Class Form1 Inherits System.Windows.Forms.Form Dim strNucleotide As String Private Sub ComboBox1_SelectedIndexChanged( ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox1.SelectedIndexChanged Dim i As Integer = ComboBox1.SelectedIndex If i = -1 Then ...Show All
.NET Development WebClient with Progress bar
I am writing a small application which allows user to enter an URL then download a file on the net. In addition, I use the progress bar to show the downloading status. These code as below using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Net; namespace DowloaderProgress { public partial class Form1 : Form { public Form1() { I ...Show All
Visual C# Creating/Writing to an Excel file with C#
How do I create and or write to an excel file from C# Thanks, Please see the code below: It will create and open the excel. It wont save it, You have to save it manually. ***********Code begins:***************** #region void PrintToExcel public void PrintToExcel(DataSet ds_PrintToExcel) { Excel.ApplicationClass excel = new Excel.ApplicationClass(); Excel.Worksheet ws = Activate(excel); if (ws != null ) { FillColumnHeaders(ws, ds_PrintToExcel); FillDataRows(ws, ds_PrintToExcel); SetAutoFitToColumns(ws,ds_PrintToExcel); excel.Visible = true ; } } ...Show All
Windows Forms DataGridView Multi-Sort Option
Hello to All. I'm trying to implement a multi sort option in dataGridView. I can do it by creating a new SelectCommand and rebind it to the control, by this approach have 2 disadvantages: 1. On big database, rebind data is a heavy command, and to rebind data seem to be a waste, when I have all the data already in my DataGridView. 2. Trying to  ...Show All
Visual C++ issue
When i add query in Design View of my *.xsd file - all ok. But, when i add one more query - appears such errors that i even do not know what to think... Point in that, that all what i created was in a visual mode by the studio designer view, instead of in a code. Thus it turns out that all these mistakes have been made by visual studio personally. So I dare to believe that it's you bug :) ------ Build started: Project: SI_prj, Configuration: Debug Win32 ------ Compiling... SI_prj.cpp c:\documents and settings\serge\desktop\vs projects\si_solu\si_prj\Form1.h(112) : error C2039: 'SI_DataSet' : is not a member of 'SI_pr ...Show All
SQL Server SELECT permission denied on object
Hi, I'm trying to upgrade my SQL 2000 to 2005 and use it with a web site. I've copied the DB from a SQL 2000 server machine to a 2005 machine, attached the DB to the SQL server using the relative function in Management Studio, but I still continue to get the same error: [Microsoft][SQL Native Client][SQL Server]SELECT permission denied on object 'Users', database 'YouPlayIt', schema 'dbo'. using this query: SELECT UserId FROM USERS. Querying the DB from an ASP page with the query "SELECT CURRENT_USER", the system return the expected value: NKNLEPETD0\IUSR_NKNLEPE ...Show All
SQL Server DataStage Vs SSIS
Hi, We are in a process of migrating a process running in Ascential Data Stage to SSIS. The database server is ORACLE 9i. We need samples/guide on the following datastage equivalent features. 1. Calling a function/script/routine from task's Data Flow transformer as Before/After Stage event. 2. Complex XML parsing and loading into sequential files. 3. Creating a batch & based on the condition calling the tasks. For example, if condition=YES then call task 'A' or call task 'B'. 4. Any shared container concept. (A portion of activity will be used by most of the tasks) 5. In the Data Flow Destination, is we have feature like insert ...Show All
Visual Studio Team System Rule Idea
Just like unused variables, it is possible to specify an unused imports/using statement. Is there a rule to notify you when this happens Nick Unfortunately, as FxCop currenly only analyzes binaries, source constructs that have no representation in the final binary (such as using/import statements), can not be analyzed. Thanks for the rule idea, but as it stands it would not be able to be implemented. ...Show All
Visual Basic Check if is installed system font
How do you check to see if a string is an installed system font ...Show All
SQL Server TSQL Strored Procedure
I am having an issue when trying to pull data from Oracle into a sqlSERVER TABLE. I'm running into an issue because I am using to much temporary space in Oracle because the return set is so large. New to sqlserver, but in Oracle the solution would be to commmit the insert after so many records have been retrieved. Here's the procedure I wrote I would think I need to add a cursor and a counter which be used to do a commit after so many rows have been retrieved. DOes so one have a procedure I could model mine after ALTER PROCEDURE [dbo] . [SP_Load_BO] -- Add the parameters for the stored procedure here @p1 int = 0 ...Show All
Visual Studio 2008 (Pre-release) Message security and Windows credentials
I'm having trouble trying to get Message security to work with Windows credentials. I have a WCF service hosted in an ASP.NET web app and the bindings are configured as follows: < bindings > < wsHttpBinding > < binding name = " myBindingConfig " > < security mode = " Message " > < message clientCredentialType = " Windows " /> </ security > </ binding > </ wsHttpBinding > However, when I call the service from a client and I try to obtain the identity of the caller using: Thread.CurrentPrincipal.Identity.Name I get an emtry st ...Show All
