Results 1 to 2 of 2

Thread: DATA INsertion Error.....

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2002
    Posts
    30

    Red face DATA INsertion Error.....

    Hello sir,
    I Got Big Prob with this Code.I want to insert some data in table names priviously created.
    Every thing is OK.I create a FileDsn ad1.


    <%
    'Define file based DSN
    strDSN = "FILEDSN=ad1.dsn"

    'Instantiate the Connection object and open a database connection
    Set cn = Server.CreateObject("ADODB.Connection")
    cn.Open strDSN

    'Define SQL SELECT statement
    strSQL="INSERT INTO names (fname, lname) VALUES ('Jose','Lugo')"
    'Use the Execute method to issue a SQL query to database
    cn.Execute(strSQL)

    %>

    It shows error like this

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
    /test.asp, line 12


    Pls help.

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Make sure you have the write permission to the Database file. This error usally happens when you try to update/add records to a database you dont have the write permission.

    Hope this helps.

    Danial
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

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