Results 1 to 5 of 5

Thread: ALTER TABLE in ADO

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16

    Unhappy

    Hi Guru's, can anyone help me with this ADO SQL command as I'm quite new to ADO. I'm trying to execute an ADD COLUMN query on a paradox table but keep getting the error:

    "Unable to update table QBASE. Table in read-only database"

    However, I am specifying read/write in the connection mode. Here is my code:

    Dim strSQL As String
    Dim cnQbase As New ADODB.Connection
    Dim cmd As New ADODB.Command

    strSQL = "ALTER TABLE QBASE2 ADD COLUMN STARTDATE DATE;"

    cnQbase.ConnectionString = "Provider=MSDASQL.1;DSN=Paradox Files;DBQ=C:\CrewTrack\Data"
    cnQbase.Mode = adModeReadWrite
    cnQbase.Open
    cmd.CommandText = strSQL
    cmd.ActiveConnection = cnQbase
    cmd.CommandType = adCmdText
    cmd.Execute

    Any help gratefully received. Thanks.

  2. #2
    Guest
    Is the correct userID & Password set up in your odbc
    DSN?

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16

    Unhappy

    There aren't any passwords or userID's for the database.

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    I tried to alter a paradox db with ADO, and I also got a similar error..... now that I think about it, I've never been able to update a paradox or dbase IISAM database via ADO.....

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2000
    Posts
    16
    Reassuring to see that some else is having the same problem. I've pretty much tried everything that I can think of now and have pretty much given up on the idea, which is quite annoying as it sets my project back!!

    Oh well, thanks to everyone who replied for their help.

    Cheers

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