UKPhil
Apr 27th, 2000, 05:32 PM
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.
"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.