Can someone help me get started

  • Deleted

  • This was removed by the editor as SPAM

  • Hi,

    I tend to do this a lot, and while it is time consuming, it generally works quite well.

    Step 1: Create a couple of functions to check your incoming data is valid. Usually one to check numeric and one to check string data is sufficient. (checks include max length, remove any spurious items such as < etc)

    Step 2: Create a connection string and a connection object and hook them together

    ConnStr = "Provider=SQLOLEDB.1;Data Source=server name or Ip;Initial Catalog=YourDatabase;Integrated Security=SSPI"

    Set Conn = Server.CreateObject("Adodb.Connection")

    CrConn.open ConnStr

    Step 3:

    Create an SQL statement. I usually use a stored procedure to handle this, but to start with you can do it raw on the page.

    Sql = "Insert Into TABleName(col1, col2, col3) Values"

    Sql = SQl & "('"&var1&"', '"&Var2&"', '"&Var3&"')"

    Where Var1 etc are your incoming variables. You don't strictly need the 'quote' for numeric data, but Sql is usually quite lenient and knows how to handle them.

    Step4 4: Execute your Sql as follows

    CrConn.Execute(Sql)

    Now check your table and if all went to plan, you will find it has a row of data in it. If it does, congratulations, you have just started on a very long, slow path to web application programming.

    All Best

     

    Conway

    PS: I am assuming you are using ASP Vbscript pages...

     

     

  • Thanks Conway.

    Yes I am using asp vbscript pages :->

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply