Ask Experts Questions for FREE Help !
Ask
    mohammad's Avatar
    mohammad Posts: 1, Reputation: 1
    New Member
     
    #1

    Mar 3, 2003, 05:12 AM
    ASP Form for update database in Sqlserver2000
    Hello
    About how can I make update in database that was based in SQL server2000

    Details:
    I made web pages in ASP, and I want to make update in database from the ASP Page
    I made the code but it gave me a message that "operation is not allowed when the object is closed"

    Bellow you can see the codes that I made them...


    [[[[[
    ---------------------------------------------------------------------------------------------------
    Update.asp:


    <%@ Language=VBScript %>
    <HTML>
    <HEAD>
    <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
    </HEAD>
    <BODY>
    <%
    Frm=Request.Form
    Strname=Request.Form ("name")
    Strlname=Request.Form ("lname")
    Strphone=Request.Form ("phone")
    Strid=Request.Form ("id")
    A=Request.QueryString ("name")
    B=Request.QueryString ("lname")
    C=Request.QueryString ("phone")
    Set cn =server.CreateObject ("adodb.connection")
    Cn.Open "library"
    Sql="update test set name = & strname & , lname = & strlname & , phone = & strphone & where id = & strid & "
    Set rs = server.CreateObject ("Adodb.recordset")
    Rs.Open sql,cn,1,2
    Do while not rs.EOF
    hswes's Avatar
    hswes Posts: 4, Reputation: 1
    New Member
     
    #2

    Apr 4, 2003, 05:50 PM
    ASP Form for update database in Sqlserver2000
    It looks fine, but you forget to tell in your asp script what database server he should connect to. Just visit the Microsoft website and ask for asp and you find hundreds of samples how to connect to a sql server database, or if you like to have it simpler use sql server web publishing wizard and you see in the asp page how he connects.
    Good luck

    Hswes

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Ms Works Database [ 3 Answers ]

I am using ms works database but the only way I can add the contents of a field is by creating a report.Anyone help me please there must be a shorter way.:)

Advertising Database [ 3 Answers ]

I work in real estate and need to set up an advertising database. Is Microsoft Access suitable for this or what would be the best program to use? I need to be able to charge out advertising on a weekly basis to each relevant property, e.g. the property address needs to be in the database and...

Undating an Access Database to SQLServer2000 [ 4 Answers ]

Where can I get info on updating an Access2000 database to SQLServer2000 Thanks in anticipation

Database [ 2 Answers ]

Hi there! I would like to have some detailed information about This topic:- Specify the hardware needed to support Database system, supporting your reasoning with argument and a detailed rationale. Waiting for your reply Cheers Reetika

Database [ 1 Answers ]

In a database I have inputed a subform. The subform adds up totals of plants by adding Price*quantity. That is fine, the problem I have is that I want to have a box that adds up all the plants totals to give an overal price. Anyway you can help me? Thanks


View more questions Search