Results 1 to 3 of 3

Thread: Database Interaction with vbscript

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204

    Question Database Interaction with vbscript

    Hi all,

    Can I interact with a SQL Server database using vbscript as I would using VB6 ? Does this require client side and server side processing??

    any examples would be appreciated,

    Cheers

    Colin

  2. #2
    Hyperactive Member parkes's Avatar
    Join Date
    Jan 1999
    Location
    Unitied Kingdom
    Posts
    303
    Try this, this works for me

    Sub LogOff(sID)

    On error resume next
    Dim dBase
    Set dBase=CreateObject("ADODB.Connection")
    sConn="PROVIDER=SQLOLEDB;Data Source=SERVER_1;Initial Catalog=MainData;uid=TestUser;pwd="
    dBase.CursorLocation="3"
    dBase.ConnectionTimeout=30
    dBase.Open sConn
    sSQL="DELETE FROM vwLoggedOn WHERE LogInitials='" & sID & "'"
    dBase.execute(sSQL)
    dBase.close
    Set dBase=nothing

    End sub
    Thanks in advance for any help provided.

    VB 6 Enterprise Edition SP4
    ADO, SQL 7/2000, ASP and some JavaScript


    >> Life goes on, but for how long? <<
    If you can smile when things go wrong, you have someone in mind to blame

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    North East (UK)
    Posts
    204
    cheers parkes,

    thats what I was looking for

    Colin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width