how to connect database in an hta

Author Message
mravi_prakash

  • Total Posts : 15
  • Scores: 0
  • Reward points : 0
  • Joined: 3/27/2006
  • Status: offline
how to connect database in an hta Monday, March 27, 2006 6:32 PM (permalink)
0
strConnectionString = "Provider=sqloledb;Data Source=mysql;Initial Catalog=DB;Trusted_Connection=yes;"
Set objConn = CreateObject("ADODB.Connection")
Set objCommand = CreateObject("ADODB.Command")
Set rs = CreateObject("ADODB.Recordset")
objConn.Open strConnectionString
Query = "SELECT * FROM time"
rs.Open Query, objConn, 1
rs.MoveFirst
Do Until rs.EOF
msgbors)
Loop
rs.Close
objConn.Close

this is wht i typed .. but no out put came .. it just displayed me a text wht i typed ...
i want my database to be access from a MSQL which runs on the stand alone ..system ... (localhost)
in my data base i have used the MYSQL ODBC connection datasource name:mysql
mysql database :sample
table:sample.time;
time is the table
can u please help its urgent
m. Ravi Prakash
B.E computer science
software engineer
 
#1
    ebgreen

    • Total Posts : 8227
    • Scores: 98
    • Reward points : 0
    • Joined: 7/12/2005
    • Status: offline
    RE: how to connect database in an hta Tuesday, March 28, 2006 3:29 AM (permalink)
    0
    Do you have On Error Resume NExt somewhere in your script? If so, comment it out. Are you getting and error?
    "... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
    Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
    http://www.visualbasicscript.com/m_47117/tm.htm
     
    #2

      Online Bookmarks Sharing: Share/Bookmark

      Jump to:

      Current active users

      There are 0 members and 1 guests.

      Icon Legend and Permission

      • New Messages
      • No New Messages
      • Hot Topic w/ New Messages
      • Hot Topic w/o New Messages
      • Locked w/ New Messages
      • Locked w/o New Messages
      • Read Message
      • Post New Thread
      • Reply to message
      • Post New Poll
      • Submit Vote
      • Post reward post
      • Delete my own posts
      • Delete my own threads
      • Rate post

      2000-2012 ASPPlayground.NET Forum Version 3.9