How to Export Chat

In this topic we will demonstrate how to export the chat from the TV Chat service.

In the TV Chat service you can set the options for automatic exporting of the chat in real-time. In this sample we will export the chat to a Microsoft Access database and we will use the chat.asp web script file to publish the chat to the web.

Files used in this sample are located in the folder:

    C:\Program Files\CodeSegment\SMS Studio\Samples\ChatService\Export

How to run this sample

  1. Create a new ODBC Data Source and set its name to SMS Chat Database. See How to Create an ODBC Data Source for detailed instructions.
  2. Open Windows Explorer and locate the CreateTables.vbs file. Double-click on this file to run the script. When asked for the name of the Data Source enter SMS Chat Database, and when asked for the table name enter Chat. A new table with the specified name will be created in the database.
  3. In SMS Studio open a TV Chat service, preferably TV Chat described in this Tutorial.
  4. Click the Setup button on the main toolbar to display the TV Chat Setup dialog.
  5. In the Export tab enter the following parameters:
    Type: ODBC Data Source
    Delete visible items: Unchecked
    Data Source: SMS Chat Database
    Table name: Chat
  6. Click the OK button to close the TV Chat Setup dialog.
  7. The exporting of the chat will now start. Make sure that the TV Chat service is started and is receiving messages from the emulator connection.
  8. To see the exported chat, open the database file and explore its tables.

Publishing chat to the web

  1. To publish chat to the web, you first need to setup a web server on your computer. See How to Setup a Web Server for detailed instructions.
  2. Copy the chat.asp file to a folder accessible by your web server (e.g. C:\Inetpub\wwwroot\smsstudio).
  3. You can view exported chat from this computer by using the following link http://localhost/smsstudio/chat.asp.
  4. To view exported chat from a remote location use the link similar to this:
    http://your.domain.name/smsstudio/chat.asp or
    http://your.IP.address/smsstudio/chat.asp.
  5. To refresh the chat, press the F5 key.

Related topics

Exporting Chat

 

Copyright © 2002-2007 CodeSegment. All rights reserved.

   www.codesegment.com