Search Results

Search found 7 results on 1 pages for 'jp2code'.

Page 1/1 | 1 

  • Authenticating Linked Servers - SQL Server 8 to SQL Server 10

    - by jp2code
    We have an old SQL Server 2000 database that has to be kept because it is needed on our manufacturing machines. It also maintains our employee records, since they are needed on these machines for employee logins. We also have a newer SQL Server 10 database (I think this is 2008, but I'm not sure) that we are using for newer development. I have recently learned (i.e. today) that I can link the two servers. This would allow me to access the employee tables in the newer server. Following the SF post SQL Server to SQL Server Linked Server Setup, I tried adding the link. In our SQL Server 2000 machine, I got this error: Similarly, on our SQL Server 10 machine, I got this error: The messages, though worded different, probably say the same thing: I need to authenticate, somehow. We have an Active Directory, but it is on yet another server. What, exactly, should be done here? A guy HERE<< said to check the Security settings, but did not say what else to do. Both servers are set to SQL Server and Windows Authentication mode. Now what?

    Read the article

  • How would I Enable FTP on Home PC (Win7)?

    - by jp2code
    In my home, all PCs connect through a small router. Some wired and some wireless. Our Media PC (HTPC) is controlled via a Media Center TV style remote, so managing files on it is tedious. I can access all of the files on the HTPC from my desktop PC, but moving a 6 GB file from \\HTPC\Folder1 to \\HTPC\Folder2 involves copying the data to the desktop and then transferring it back. If I were on the HTPC, this would likely be handled by a simple address change for the file (i.e. it would be done almost instantly). I'm thinking if I could get an FTP program to connect to the HTPC, I could simplify things ...but how do I enable that ability on the HPTC? Then, how would I go about connecting to the HTPC? Would I simply enter \\HTPC as the FTP address?

    Read the article

  • C#: Graphics DrawString to Exactly Place Text on a System.Label

    - by jp2code
    I have overridden the OnPaint method of my Label control in VS2008: void Label_OnPaint(object sender, PaintEventArgs e) { base.OnPaint(e); Label lbl = sender as Label; if (lbl != null) { string Text = lbl.Text; e.Graphics.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; if (myShowShadow) { // draw the shadow first! e.Graphics.DrawString(Text, lbl.Font, new SolidBrush(myShadowColor), myShadowOffset, StringFormat.GenericDefault); } e.Graphics.DrawString(Text, lbl.Font, new SolidBrush(lbl.ForeColor), 0, 0, StringFormat.GenericDefault); } } This works, but I really want to find out how to center the text both vertically and horizontally. I've heard of the MeasureString() method, but my "Text" complicates matters because it could include page breaks. Could someone guide me with how to do this?

    Read the article

  • Painting to Form then to Printer

    - by jp2code
    I often find myself needing to create custom reports that do NOT work with Crystal Reports or Report Viewer. Often, I hack a DataTable together and dumping that into a DataGridView control. It is never pretty, and printing is difficult. What I need is a class that I can call using the OnPaint event, but I've never sat down and written all of the Pen and Brush commands until now. Painting to the screen and painting to a printer both use the Graphics object, so I want to build a class that I'd pass in the Graphics object, my window bounds (a Rectangle), and some data (in the form of an instance of my class) that I'd use to paint a form or a sheet of paper. That sounds like a great concept! Surely, someone has done something like this before. Does anyone know of a book, a website tutorial, or video that goes into this? If someone wants to write all that out for me here, more power to you - but I'd think that would be too much work.

    Read the article

  • Stored Procedure Does Not Fire Last Command

    - by jp2code
    On our SQL Server (Version 10.0.1600), I have a stored procedure that I wrote. It is not throwing any errors, and it is returning the correct values after making the insert in the database. However, the last command spSendEventNotificationEmail (which sends out email notifications) is not being run. I can run the spSendEventNotificationEmail script manually using the same data, and the notifications show up, so I know it works. Is there something wrong with how I call it in my stored procedure? [dbo].[spUpdateRequest](@packetID int, @statusID int output, @empID int, @mtf nVarChar(50)) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @id int SET @id=-1 -- Insert statements for procedure here SELECT A.ID, PacketID, StatusID INTO #act FROM Action A JOIN Request R ON (R.ID=A.RequestID) WHERE (PacketID=@packetID) AND (StatusID=@statusID) IF ((SELECT COUNT(ID) FROM #act)=0) BEGIN -- this statusID has not been entered. Continue SELECT ID, MTF INTO #req FROM Request WHERE PacketID=@packetID WHILE (0 < (SELECT COUNT(ID) FROM #req)) BEGIN SELECT TOP 1 @id=ID FROM #req INSERT INTO Action (RequestID, StatusID, EmpID, DateStamp) VALUES (@id, @statusID, @empID, GETDATE()) IF ((@mtf IS NOT NULL) AND (0 < LEN(RTRIM(@mtf)))) BEGIN UPDATE Request SET MTF=@mtf WHERE ID=@id END DELETE #req WHERE ID=@id END DROP TABLE #req SELECT @id=@@IDENTITY, @statusID=StatusID FROM Action SELECT TOP 1 @statusID=ID FROM Status WHERE (@statusID<ID) AND (-1 < Sequence) EXEC spSendEventNotificationEmail @packetID, @statusID, 'http:\\cpweb:8100\NextStep.aspx' END ELSE BEGIN SET @statusID = -1 END DROP TABLE #act END Idea of how the data tables are connected:

    Read the article

  • What Color is the Windows' System.Control? (Visual Studio Design View)

    - by jp2code
    In Visual Studio Design View, the selection of Form Colors in the Properties Pane are selectable from the "Custom", "Web", and "System" tabs. Of course, the color number can be used, too. When the "System" Tab is selected, the colors in the list depend on what type of Theme the Computer User has set on the PC. I'd like to stick with this, but I need to know how to "read in" the colors. I have controls that I create "on-the-fly" or often need to change a color back after getting the person's attention using a blink/flicker technique. How do I get the list of System Theme colors? Most forms have a BackColor that defaults to "Control", which looks like a very light gray under Windows 7, running the default Windows 7 Theme. I've managed to grab a color by physically reading the ARGB value in code, but I'd rather have a way to access the colors by their Theme Name, if that can be done. public Form1() { Color cControl = this.BackColor; Console.WriteLine(cControl.Name); // there is not always a name! } Does anyone know what I'm talking about?

    Read the article

  • T-SQL: Dynamic Query by Selected Column in ASP.NET GridView

    - by jp2code
    I'm trying to modify a stored procedure used in an ASP.NET page. By default, the stored procedure returns all of the data, which can be overwhelming for employees in the plant. I want to add a drop down menu item for the column name and a text box for a value to allow our employees to search the data for their specific items. What I would like to add is the ability to pass in a Column Name and Column Value to search, similar to the following: DECLARE @colName nVarChar(50), @colValue nVarChar(50) SET @colName='EmployeeID' SET @colValue='007135' SELECT Column1, Column2, Column3, Column4, Column5, Column6, Column7 FROM viewNum1 WHERE ((@colName IS NULL) OR (@colValue IS NULL) OR ('['+@colName+']'=@colValue)) If all values passed in (@colValue and @colName), all records return; however, if I try specifying that @colName=EmployeeID and @colValue='007135' (a value that does exist in the database), no records are returned. Next is the problem that I am running an old SQL Server 2000 database that does not allow the stored procedure to access the table column names, and the whole technique looks prone to SQL Injection. Finally, I don't see how to bind my GridView control to this and still have the ability to display all records. How would I write such a filtering stored procedure?

    Read the article

1