July 27, 2000

ASP Number Formatting

Question: How do I format my numbers in the format ######, where a number of 123 would display as 000123? Answer: Concatenate a string of zeros to the left of your number and then call the NumberFormat function on the right “n” portion of it. So, if your variable “intValue”

Changing Limits on Message Size

Question: How do I change the size limits of messages in a mailbox? Answer: You can’t really set a limit on the individual messages already in a mailbox, but you can place limits on the message sizes that will pass through the various connectors. And you certainly can place limits

New Line Character in ASP

Question: How do I define a new line character in ASP? Answer: In ASP (VBScript), use the constant vbCrLF to add line breaks in your string variables: strString = “Hello” & vbCrLF & “There” The constant will do the same thing in C: strString = “Hello There”

Return a Recordset from a COM Component to ASP

Question: Can I make a COM component in VB return a query result in the form of a recordset to the calling ASP Script? Answer: Yes, a COM component can return a recordset. Create your Public Function in the (VB) COM component as follows: Public Function GetRecordSet(byval strSQL as variant)

Sending Data from an ASP Page to a Database

Question: How do I send data from a form in an ASP page to a database table in SQL Server 7.0? Answer: Obtain the data from the ASP page’s Forms collection that the form’s ACTION attribute refers to: strValue = Request.Form(“FormFieldName”) Either build a SQL statement that uses these values

Reading Hotmail in Outlook

Question: Can I use Outlook 98 to read my hotmail messages like I can with Outlook Express? Answer: Not like you do with Outlook Express, no. With Outlook 2000, you can sort of do it by opening a Web page within the Outlook folder view (you can create a shortcut

Viewing Resource in Public Folder

Question: I have set up conference rooms as mailboxes in Outlook 2000, which is working well but I have a few questions: Currently, we have to schedule the room as a resource before the “automatically decline conflicting meeting requests” works. Do I have something configured incorrectly? If you invite the

Delete Files from SQL Server Local Machine

Ever wanted to delete files from the local machine that your SQL Server database is running? You can do it using the extended stored procedure xp_cmdshell like this: EXEC master..xp_cmdshell ‘del C:file.txt’ But this requires the sysadmin option on the SQL Server and Admin role fromNT server. In most instances