Results 1 to 2 of 2

Thread: VB script Question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Location
    US, PA
    Posts
    79

    VB script Question

    <P><INPUT name="Update_Records" onclick="Update_Records" type="Button" value="Update Data"></P>

    <%
    Function Update_Records_onClick()
    Set Cmd = server.CreateObject ("ADODB.Command")
    Set Cmd.ActiveConnection=MyConnection
    ...
    ...
    ...
    Response.write "Records are updated"
    %>

    I want to use a command button, when clicked, should execute the function. Well nothing is happening, it is not calling the function. What am I doing wrong??

    In the code for the button, onclick: I tried writing "Update_Records", Update_Records, Update_Records(), "Update_Records()".... Nothing worked

  2. #2
    Frenzied Member monte96's Avatar
    Join Date
    Sep 2000
    Location
    Somewhere in AZ
    Posts
    1,379
    You are trying to do database updates from the client side. The database is on your server.

    You will need to make your button call your page and put a conditional check to see whether the page has been called by itself or not, and if so, do the update in server side ASP code.
    oOOo--oOOo
    __/\/\onte96
    oOOo--oOOo
    Senior Programmer/Analyst
    MCP
    [email protected]
    [email protected]


    Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..

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