I am using pypyodbc(python 64bit) to connect to MS access(64 bit) for my project. Using SQL query ( such SET DEFAULT, DEFAULT=0) i have to set column to the default values. But query results in string error. I donot want to use OLE DB. Is there any way to fix this?
Asked
Active
Viewed 56 times
0
-
That query doesn't look valid at all. Please share your actual code. – Erik A Jun 25 '18 at 15:13
-
Access' SQL dialect does support that `SET` command. – Parfait Jun 25 '18 at 18:20
-
I have tried following queries "CREATE TABLE SectionChange(SecID integer SET DEFAULT=10, StartTime varchar(50), EndTime varchar(50), indes varchar(50))" and "CREATE TABLE SectionChange(SecID integer SET DEFAULT 10, StartTime varchar(50), EndTime varchar(50), indes varchar(50))" Why it is so only for ODBC connection?. I have heard that SET DEFAULT command works for OLE DB or ADO connection. How do i fix this without going to OLE DB or ADO connection. Please help. – RaghavMM Jun 26 '18 at 15:54
-
Try changing `SecID integer SET DEFAULT=10` to `SecID integer DEFAULT 10` – Gord Thompson Jun 26 '18 at 18:28
-
I tried SecID integer DEFAULT 10. Still the same error. I have tried SecID integer DEFAULT '10' . None of the syntax type seems to be working – RaghavMM Jun 27 '18 at 12:23
-
Sorry, I forgot that DEFAULT is only supported under OLEDB. My apologies for the false lead. – Gord Thompson Jul 19 '18 at 18:02