Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jasonp45
  • Content: Threads
  • Order by date
  1. jasonp45

    Speeding up SQL inserts (SQL vs SSIS, MSSQL 2008 R2)

    The following insert query took ~8 mins on 1 million rows, going from an SQL table to another SQL table on a linked server: INSERT INTO [LinkedServer].[LinkedDatabase].[dbo].[LinkedTable] SELECT * FROM [LocalDatabase].[dbo].[LocalTable] However, creating an SSIS package and specifying 'Fast...
  2. jasonp45

    GPG command-line on Windows

    I'm trying to decrypt a GPG/PGP file using GPG via the command line. This works: "C:\Program Files\GnuPG\gpg.exe" -o "C:\MyFile.txt" -d "C:\MyEncryptedFile.pgp" However the command-window prompts me for my passphrase. I plan on scripting this and calling an InputBox to prompt for the...
  3. jasonp45

    GPG decryption via script?

    I have a PGP-encrypted file which I download and decrypt on my machine (currently via the GPG Windows GUI). Call the file 'MyFile.gpg'. I want to automate the decryption of this file. However I can't seem to locate a reference detailing the command-line syntax necessary, though I did find the...
  4. jasonp45

    OpenSSH on Windows Server 2003

    I've installed OpenSSH successfully, and it works fine for my user account (Domain Administrators group). However when I add a new Domain User, then add this to the OpenSSH 'passwd' file, login via SFTP client fails. If I add this user to the Domain Administrators group their SFTP login works...
  5. jasonp45

    Common File Dialog for Vista

    I'm on 64-bit and I've found that the old MSComDlg.CommonDialog object can only be invoked under 32-bit. I can use the Word dialog but of course that requires installing Word, and creating the Word.Application object is slow. What I'd like to know is how (or if) I can invoke a file-open/browse...
  6. jasonp45

    Purge stored FTP security certificates?

    There is a secure FTP site I connect to (using FileZilla client). Many months ago I clicked 'Always trust' on their certificate in the FileZilla interface; now I can no longer connect. I know the site still works because I can connect from another (XP) machine...on that machine I get the...
  7. jasonp45

    Clipboard access - best way? (64-bit gotcha)

    I can access the clipboard via the IE object, but this requires interaction. Since I have AutoIt installed I found that I can write to the clipboard like this: Private Sub Write_to_Clipboard(sClipboard_Text) Dim oAutoIt 'as Object = AutoItX3.Control Set oAutoIt =...
  8. jasonp45

    List Scheduled Tasks via script?

    I'm trying to list the names of the Scheduled Tasks on my 64-bit Win 2008 server so I can export them. I discovered that I can easily export them as XML files, all at once (in which case they can't be imported on another machine), or individually by name with the following command-line syntax...
  9. jasonp45

    Array as property problem

    I'm trying to use a string array as a property. I can read the LBound/UBound so it seems the array is loading properly during the 'Let', and the 'Get' is working for the boundary functions, but I can't seem to access the values. Any ideas? Set oMyClass = New cArrayTest With oMyClass...
  10. jasonp45

    How to export/migrate Scheduled Tasks (preferably via script)

    I have several Scheduled Tasks on one of my Vista machines, and I will soon be migrating to another machine. What I'd like to do is export (or copy) all of these tasks via script to some shared location, then import them on the new machine. I've looked in Windows\Tasks but don't see my tasks...
  11. jasonp45

    Test if text-file is Unicode?

    I need to convert a Unicode file to ASCII; I found a simple VBScript to do this (see below). However, I only want to make this conversion if the source file is Unicode. How can I test the file to see if it's Unicode? Thanks. Here's the script: Option Explicit Dim sSourceFileName 'as String...
  12. jasonp45

    DTS structured storage file runs from one machine but not another

    I have a DTS package stored in a structured storage file. When I call the package from the command-line on one (actually several) machine on my network it executes normally. We just added a new machine to the network, configured it, but when I run the package I get the following error: Error...
  13. jasonp45

    Obtain folder pathname from BrowseForFolder interface

    Running a VBScript on my XP machine (not associated with any Web stuff) this works fine in bringing up a folder-browser and reporting the folder's title: Dim oAppShell 'as Shell.Application Dim oFolder 'as Folder Set oAppShell = CreateObject("Shell.Application") Set oFolder =...
  14. jasonp45

    Turn off 'Open File - Security Warning'?

    Just installed Win2008 Server, along with all the apps I need to run a Visual Basic 6 application. The only problem is, when it gets to various shell-commands an 'Open File - Security Warning' message box pops up, asking if I really want to run the exe being called by the shell. (Same thing...
  15. jasonp45

    BCP In: "Unexpected EOF" error

    I am trying to migrate some of my DataJunction (a conversion tool) conversions over to BCP. First I imported one of my fixed-format text-files into SQL Server 2005 using DataJunction. Then I generated a BCP XML format file via the command-line. Next I truncated the table, then tried to load the...
  16. jasonp45

    Specify precision of decimal?

    I have a decimal variable. I'd like it to store a number rounded to two decimal places. I've declared and loaded it like this: private Decimal FileSize_MB_DataFile = 0.0M; this.FileSize_MB_InitialFile = Convert.ToDecimal(fileInfo.Length) / 1048576; //1024 x 1024 I want the actual value of...
  17. jasonp45

    Casting question

    I have a class property 'FileSize_MB_InitialFile', declared as Int16. When I set it like this it works: this.FileSize_MB_InitialFile = Convert.ToInt16(fileInfo.Length); But when I set it like this (since I want MB, not bytes), it throws an error: this.FileSize_MB_InitialFile =...
  18. jasonp45

    Handling null values returned via SQL query

    How do I test for and handle a return of null in the following code? try { OleDbConnection connection = new OleDbConnection(connectionString); connection.Open(); OleDbCommand command = new...
  19. jasonp45

    OpenFileDialog: Filter specific number pattern?

    I want to set the OpenFileDialog filter to something like "info.9999", where the 9999 can be any 4 numbers. Is there a wildcard or formatting option to allow this? I don't want the filter to be "info.*", because I'm looking specifically for files with four numbers after the period. Thanks.
  20. jasonp45

    Scheduled task not working

    I have several VBScripts I run via Scheduled Tasks; they work fine. However I just created a new one and it won't work. If I click the VBS file to activate the script it executes perfectly (uses Robocopy to synchronize two folders). When the Scheduled Task runs, the task shows as having run...

Part and Inventory Search

Back
Top