Error with fieldname with space ( ' ' ) - SQL Server

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for SQL Server in Delphi and C++Builder
Post Reply
spwrodrigo
Posts: 2
Joined: Tue 18 Jun 2013 17:22

Error with fieldname with space ( ' ' ) - SQL Server

Post by spwrodrigo » Tue 18 Jun 2013 17:27

Hi.

I'm trying to update dbexpsda.dll version to the last one but it occurs an error in all the tables that have fieldname with space.
I'm using SQL Server and I can´t save anything in that tables.
I tried to use UseQuotedChar in param connections but it doesn't work.
Anyone can help me? I need to update to use Delphi XE4.

Thanks,
Rodrigo

AndreyZ

Re: Error with fieldname with space ( ' ' ) - SQL Server

Post by AndreyZ » Wed 19 Jun 2013 08:44

Hello,

I cannot reproduce the problem. Please specify the exact error that occurs. Also, specify the script to create your table (that has a field with a name containing space).

spwrodrigo
Posts: 2
Joined: Tue 18 Jun 2013 17:22

Re: Error with fieldname with space ( ' ' ) - SQL Server

Post by spwrodrigo » Wed 19 Jun 2013 12:10

Hi,

The table sctructure is:

CREATE TABLE [dbo].[SCDT51](
[Codigo Situacao Cadastral] [int] NOT NULL,
[Descricao Sit. Cadastral] [varchar](60) NULL,
[Codigo Agrupamento] [int] NULL,
[Bloqueia Debito] [char](3) NULL,
[Estado Conselho] [varchar](2) NULL,
[DescSitCadastralWEB] [varchar](30) NULL,
CONSTRAINT [SCDT51_PRIMARY] PRIMARY KEY CLUSTERED
(
[Codigo Situacao Cadastral] ASC
)
)

The message error is:

---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EMSError with message 'SQL State: 1, SQL Error Code: 102, Level: 15, Procedure: , Line: 2
Sintaxe incorreta próxima a 'Sit'.'. Process stopped. Use Step or Run to continue.

Another Example:
Table:
CREATE TABLE [dbo].[SCDT36](
[Codigo Tipo Curso] [int] NOT NULL,
[Descricao Tipo Curso] [varchar](30) NULL,
CONSTRAINT [SCDT36_PRIMARY] PRIMARY KEY CLUSTERED
(
[Codigo Tipo Curso] ASC
)
)

Error:
---------------------------
Debugger Exception Notification
---------------------------
Project Project1.exe raised exception class EMSError with message 'SQL State: 1, SQL Error Code: 102, Level: 15, Procedure: , Line: 2
Sintaxe incorreta próxima a 'Tipo'.'. Process stopped. Use Step or Run to continue.

AndreyZ

Re: Error with fieldname with space ( ' ' ) - SQL Server

Post by AndreyZ » Thu 20 Jun 2013 06:10

Unfortunately, I still cannot reproduce the problem. It seems that there are files from the old dbExpress driver for SQL Server version left on your computer. Please try the following:
- remove dbExpress driver for SQL Server;
- remove all dbexpsda*.dll and DBXDevartSQLServerDriver*.bpl files from your computer;
- remove *.dcu files from your project;
- install dbExpress driver for SQL Server 6.2.3.

Post Reply