Home Home    Forum    Blog    Feed your aggregator (RSS 2.0)

The Johnnynine Weblog - Monday, November 07, 2005
A weblog by Johnny Hughes
 
 Monday, November 07, 2005

Although an Oracle DSN supports timeouts (which can be disabled via a checkbox), creating a DSN-less connection in VB6 will not respect any settings for the Connection.ConnectionTimeout or Command.CommandTimeout settings.  It just ignores them and your application will sit and wait until the request is done.

See MDSN article ID: 251248

http://support.microsoft.com/default.aspx?scid=kb;en-us;251248


The Microsoft Oracle ODBC driver and Microsoft OLE DB Provider for Oracle do not support setting connection timeouts or query timeouts.

There is no workaround to allow setting a query timeout.

For connection timeouts you can work around the issue, if your database application framework supports asynchronous operations. By putting the call to open the connection in an asynchronous loop and checking the status of the connection, you can terminate the connection if it does not occur in the stated duration of time. The implementation of this solution is application-dependent, but an example using ActiveX Data Objects (ADO) is shown in the "More Information" section of this article.
Monday, November 07, 2005 6:52:26 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   Database | Oracle | Technical  | 
 Monday, October 10, 2005


DECLARE @TruncateStatement nvarchar(2000)
DECLARE TruncateStatements CURSOR LOCAL FAST_FORWARD
FOR SELECT N'TRUNCATE TABLE ' +
   QUOTENAME(TABLE_SCHEMA) +
   N'.' + QUOTENAME(TABLE_NAME)
FROM
   INFORMATION_SCHEMA.TABLES
WHERE
   TABLE_TYPE = 'BASE TABLE' AND
   OBJECTPROPERTY(OBJECT_ID(QUOTENAME(TABLE_SCHEMA) +
   N'.' + QUOTENAME(TABLE_NAME)), 'IsMSShipped') = 0
OPEN TruncateStatements
FETCH NEXT FROM TruncateStatements INTO @TruncateStatement
WHILE @@FETCH_STATUS = 0
BEGIN
   FETCH NEXT FROM TruncateStatements INTO @TruncateStatement
   EXEC(@TruncateStatement)
END
-- Clean up work
CLOSE TruncateStatements
DEALLOCATE TruncateStatements


Since this script doesn't take parent-child relationships into consideration it may have to be run more than once if you have any set up.

Again, I like to give credit where credit is due, but I don't have an original source for this code.  Searching on keywords in it will reveal several web pages with it posted.
Monday, October 10, 2005 7:49:56 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   Database | Sql Server  | 
 Tuesday, September 06, 2005

You can not rename a SQL Server database from Enterprise Manager, but you can with the sp_renamedb stored procedure.  You must first set the database to singe user.

1. Set the database to Single User by right clicking the database in Enterprise Manager, select Properties, select the Options Tab, check the Restrict Access checkbox, and select Read-Only, then click OK.
2. Close Enterprise Manager (since we can only have 1 user accessing it at a time now).
3. Open Query Analyser.
4. Type:  sp_renamedb <oldname>, <newname>
5. Don't forget to reset the Restrict Access settings on the database that you changed in step 2.

Tuesday, September 06, 2005 5:31:19 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [5]   Database | Sql Server  | 
 Monday, August 08, 2005

WinZip allows you to scan your archive with a virus scanning tool.  Unfortunately it does not provide instructions on how to use Grisoft's AVG product.

When you receive a Zip file in e-mail or through other means, you should follow the same basic security procedures that you follow for any other file: use good virus scanning software, and know the source of the file. If you follow sensible security guidelines, you can be comfortable working with Zip files that you receive.

To enable virus scanning with AVG within WinZip:

1. Start Winzip in classic mode.
2. Select the Options -> Configuration... menu item.
3. Select the Program Locations tab.
4. In the Scan Program field, enter the path to the avgw.exe file.
    Mine was: C:\Program Files\Grisoft\AVG Free\avgw.exe
5. In the Parameters field, enter:  /se %d
6. Click OK.
7. To test it open a .zip file and select the Actions -> Virus Scan menu item.

Set your virus scanner to run a complete system scan on a schedule, and always scan files you download from the internet.

Tuesday, August 09, 2005 6:29:49 AM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   Technical  | 
 Friday, August 05, 2005

VMWare 4.5

Boot time: 1 min 40 sec.
CPU Usage: 1%
Network: Could not get the adapter drivers installed.
Usage is obviously slower than on a physical machine, but not too bad.

VPC2004

Boot time: 4 min 45 sec.
CPU Usage: 85%
Network: Worked fine.
Usage is so bad that I can see the Start Menu rendering when clicked on.


Conclusion:  If you really want to run Windows Vista Beta 1 in a virtual machine and don't care about the network adapter, I'd go with VMWare byfar.

Friday, August 05, 2005 8:37:52 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0]   Technical  | 
Copyright © 2009 Johnny Hughes. All rights reserved.
DasBlog 'Portal' theme by Johnny Hughes.