Insert into error

R

RB Smissaert

Doing an insert into an Access table with data from Interbase via ODBC and
ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE, RDB$QUERY_NAME,
RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT, RDB$RETURN_ARGUMENT,
RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO, RDBENTRYPOINT
CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 
D

David F Cox

I cannot speak for Access, but I do not understand IN ""
will it work without that?
 
R

RB Smissaert

It works fine with non-system tables (no $ in table or field names), but I
will try without.

RBS

David F Cox said:
I cannot speak for Access, but I do not understand IN ""
will it work without that?

RB Smissaert said:
Doing an insert into an Access table with data from Interbase via ODBC
and ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE,
RDB$QUERY_NAME, RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT,
RDB$RETURN_ARGUMENT, RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO,
RDBENTRYPOINT CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 
R

RB Smissaert

Exactly same error, but now it doesn't work in any other
case, so I do need that.

RBS

David F Cox said:
I cannot speak for Access, but I do not understand IN ""
will it work without that?

RB Smissaert said:
Doing an insert into an Access table with data from Interbase via ODBC
and ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE,
RDB$QUERY_NAME, RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT,
RDB$RETURN_ARGUMENT, RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO,
RDBENTRYPOINT CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 
B

Bill Mosca, MS Access MVP

David

Try putting square brackets around the field names with dollar signs.
select [RDB$FUNCTION_NAME], [RDB$FUNCTION_TYPE],...
--
Bill Mosca, MS Access MVP


David F Cox said:
I cannot speak for Access, but I do not understand IN ""
will it work without that?

RB Smissaert said:
Doing an insert into an Access table with data from Interbase via ODBC
and ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE,
RDB$QUERY_NAME, RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT,
RDB$RETURN_ARGUMENT, RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO,
RDBENTRYPOINT CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 
B

bart.smissaert

Thanks, that sounds a promising one.
Will try it out when I am back from work and let you know.

RBS
David

Try putting square brackets around the field names with dollar signs.
select [RDB$FUNCTION_NAME], [RDB$FUNCTION_TYPE],...
--
Bill Mosca, MS Access MVP


David F Cox said:
I cannot speak for Access, but I do not understand IN ""
will it work without that?

RB Smissaert said:
Doing an insert into an Access table with data from Interbase via ODBC
and ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE,
RDB$QUERY_NAME, RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT,
RDB$RETURN_ARGUMENT, RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO,
RDBENTRYPOINT CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 
R

RB Smissaert

Have tried this now and it works indeed.
It needed a bit of serious parsing, but all fine now.
Thanks for the tip.

RBS

Bill Mosca said:
David

Try putting square brackets around the field names with dollar signs.
select [RDB$FUNCTION_NAME], [RDB$FUNCTION_TYPE],...
--
Bill Mosca, MS Access MVP


David F Cox said:
I cannot speak for Access, but I do not understand IN ""
will it work without that?

RB Smissaert said:
Doing an insert into an Access table with data from Interbase via ODBC
and ADO.
The table is made fine and all the fields are present with the right
datatype, but keeping getting an error
with this statement:

INSERT INTO Test (RDBFUNCTION_NAME, RDBFUNCTION_TYPE, RDBQUERY_NAME,
RDBDESCRIPTION, RDBMODULE_NAME, RDBENTRYPOINT, RDBRETURN_ARGUMENT,
RDBSYSTEM_FLAG) select RDB$FUNCTION_NAME, RDB$FUNCTION_TYPE,
RDB$QUERY_NAME, RDB$DESCRIPTION, RDB$MODULE_NAME, RDB$ENTRYPOINT,
RDB$RETURN_ARGUMENT, RDB$SYSTEM_FLAG from RDB$FUNCTIONS IN ""
[ODBC;DB=localhost:C:\Torex\Synergy\Meddata\S6000\db\s6.gdb;DSN=System
6000;UID=UN;PWD=PW;]

This is the error I get:
Description: Syntax error in FROM clause.
Error number: 3131

This is the statement that creates the Access table:

CREATE TABLE eret (RDBFUNCTION_NAME CHAR, RDBFUNCTION_TYPE LONG,
RDBQUERY_NAME CHAR, RDBDESCRIPTION MEMO, RDBMODULE_NAME MEMO,
RDBENTRYPOINT CHAR, RDBRETURN_ARGUMENT LONG, RDBSYSTEM_FLAG LONG)

It somehow may have to do with the $ in the fields, but I can't see how.
Thanks for any advice.

RBS
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top