 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Penny Guest
|
Posted: Mon Jul 26, 2004 1:23 pm Post subject: Fields are missed |
|
|
Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all fields
only some fields appears and many fields of the Select statement are missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
| Back to top |
|
 |
Dmitry Arefiev [gs-soft.r Guest
|
Posted: Mon Jul 26, 2004 1:48 pm Post subject: Re: Fields are missed |
|
|
Hi Penny !
| Quote: | The question is, I use a SQLDataSet and when I call method Add all fields
only some fields appears and many fields of the Select statement are missed.
What am I doing wrong?
|
Nothing wrong from your side. dbExpress does not include into
result set fields of unknown for driver data types. Check either
Open ODBC dbExpress driver or go with ADO.
Regards,
Dmitry
--
Dmitry L. Arefiev, gs-soft Company, http://www.gs-soft.com
Personal - http://www.da-soft.com
SAPx - Delphi to SAP R/3 direct access
Saphir - SAP R/3 metadata on your fingertips
MetaBase - ERWIN model in Delphi applications
GISx - GIS system booster and simplifier
NCOCI8 - Freeware Delphi to ORACLE direct access
SCard - Complete PKCS11 and X509 solution
|
|
| Back to top |
|
 |
Kris Golko Guest
|
Posted: Mon Jul 26, 2004 3:39 pm Post subject: Re: Fields are missed |
|
|
Dmitry Arefiev [gs-soft.ru] wrote:
| Quote: | Hi Penny !
The question is, I use a SQLDataSet and when I call method Add all fields
only some fields appears and many fields of the Select statement are missed.
What am I doing wrong?
Nothing wrong from your side. dbExpress does not include into
result set fields of unknown for driver data types.
I didn't know that, what SQL Server data type are unknown to dbExpress? |
|
|
| Back to top |
|
 |
Penny Guest
|
Posted: Mon Jul 26, 2004 4:30 pm Post subject: Re: Fields are missed |
|
|
Thank for your time Dmitry
How this fields can be of unknown for driver data types, when in my table I
have 5 Datetime and it loads only one?
Which are the unknown for driver data types?
What you mean by Open ODBC dbExpress ?
Thanks again
| Quote: | Hi Penny !
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
Nothing wrong from your side. dbExpress does not include into
result set fields of unknown for driver data types. Check either
Open ODBC dbExpress driver or go with ADO.
Regards,
Dmitry
--
Dmitry L. Arefiev, gs-soft Company, http://www.gs-soft.com
Personal - http://www.da-soft.com
SAPx - Delphi to SAP R/3 direct access
Saphir - SAP R/3 metadata on your fingertips
MetaBase - ERWIN model in Delphi applications
GISx - GIS system booster and simplifier
NCOCI8 - Freeware Delphi to ORACLE direct access
SCard - Complete PKCS11 and X509 solution
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Mon Jul 26, 2004 5:40 pm Post subject: Re: Fields are missed |
|
|
If you do not add any fields at design-time could you see them on runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
| Quote: | Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
Dmitry Arefiev [gs-soft.r Guest
|
Posted: Mon Jul 26, 2004 7:30 pm Post subject: Re: Fields are missed |
|
|
Hello !
I am wrong ... I have tested and all possible (most) data
type fields was represented by dbExpress components
as fields. I have mixed with some other driver ... But cant
remember which one ...
Regards,
Dmitry
--
Dmitry Arefiev, gs-soft Company, community.gs-soft.com
Personal - www.da-soft.com
SAPx - Delphi to SAP R/3 direct access
Saphir - SAP R/3 metadata on your fingertips
MetaBase - ERWIN model in Delphi applications
NCOCI8 - Freeware Delphi to ORACLE direct access
|
|
| Back to top |
|
 |
Penny Guest
|
Posted: Tue Jul 27, 2004 8:08 am Post subject: Re: Fields are missed |
|
|
This is the create table :
CREATE TABLE [dbo].[SPREQ] (
[ID] [int] NOT NULL ,
[VSL_ID] [int] NULL ,
[RQ_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_DATE] [datetime] NULL ,
[RQ_OFF_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_OFF_DATE] [datetime] NULL ,
[RQ_OFF_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PORT_ID] [int] NULL ,
[RQ_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_STATUS] [smallint] NULL ,
[RQ_CATEG] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FL_MDL] [smallint] NULL ,
[DATE_IN] [datetime] NULL ,
[USERIN_ID] [int] NULL ,
[DATE_UPD] [datetime] NULL ,
[USERUPD_ID] [int] NULL ,
[SPPRTY_ID] [int] NULL ,
[FL_SENT] [smallint] NULL ,
[FL_STAGE] [smallint] NULL ,
[FL_ERR] [smallint] NULL ,
[VREQ_ID] [int] NULL ,
[ETA] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CP_ID] [int] NULL ,
[VO_ID] [int] NULL ,
[CS_ID] [int] NULL ,
[FL_CHNG] [smallint] NULL ,
[MRG_TO_ID] [int] NULL ,
[FL_MRG] [smallint] NULL ,
[AFL_SU] [smallint] NULL ,
[ASU_DATE] [datetime] NULL ,
[ASU_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ASU_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[AFL_PM] [smallint] NULL ,
[APM_DATE] [datetime] NULL ,
[APM_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[APM_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RSP_ID] [int] NULL ,
[FL_VSLCNF] [smallint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
This is my query :
SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN, FL_MDL, FL_STAGE, PORT_ID,
RQ_CATEG, RQ_NOTE, RQ_OFF_REF FROM SPREQ
ORDER BY RQ_DATE
It seems that it loads only the first six field form the select statement
(?????)
The same thing happens whichever field I selected.
My database was before in MS Access and I used Delphi Data Pump to transfer
it in SQL Server. Is there something wrong with that???
Thanks a lot.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote
| Quote: | If you do not add any fields at design-time could you see them on runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
Penny Guest
|
Posted: Tue Jul 27, 2004 8:17 am Post subject: Re: Fields are missed |
|
|
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote
| Quote: | If you do not add any fields at design-time could you see them on runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
|
No I can't see them Runtime, it says that field doesn't exist.
I do showmessage(SQLDataset['RQ_CATEG']) and I got the error.
| Quote: |
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Tue Jul 27, 2004 9:40 am Post subject: Re: Fields are missed |
|
|
This works in my test:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
SQLConnection1.DriverName := 'MS SQL';
SQLConnection1.LibraryName := 'dbexpmss.dll';
SQLConnection1.VendorLib := 'oledb';
SQLConnection1.GetDriverFunc := 'getSQLDriverMSSQL';
//Place correct values here
SQLConnection1.Params.Values['DataBase'] := 'XXX';
SQLConnection1.Params.Values['OS Authentication'] := 'True';
SQLDataSet1.SQLConnection := SQLConnection1;
SQLDataSet1.CommandText := 'SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN, '
+
'FL_MDL, FL_STAGE, PORT_ID, RQ_CATEG, RQ_NOTE, RQ_OFF_REF ' +
'FROM SPREQ ORDER BY RQ_DATE';
SQLDataSet1.Active := True;
Memo1.Clear();
for i:=0 to SQLDataSet1.Fields.Count-1 do
Memo1.Lines.Add(SQLDataSet1.Fields[i].FieldName);
end;
Does it work for empty table (just retype CREATE TABLE statement to get
empty table without indeces etc.)? Is it possible that you (your
username/password used for connection) do not have enhough rights to view
some columns?
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:41060d7d (AT) newsgroups (DOT) borland.com...
| Quote: | This is the create table :
CREATE TABLE [dbo].[SPREQ] (
[ID] [int] NOT NULL ,
[VSL_ID] [int] NULL ,
[RQ_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_DATE] [datetime] NULL ,
[RQ_OFF_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_OFF_DATE] [datetime] NULL ,
[RQ_OFF_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PORT_ID] [int] NULL ,
[RQ_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_STATUS] [smallint] NULL ,
[RQ_CATEG] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FL_MDL] [smallint] NULL ,
[DATE_IN] [datetime] NULL ,
[USERIN_ID] [int] NULL ,
[DATE_UPD] [datetime] NULL ,
[USERUPD_ID] [int] NULL ,
[SPPRTY_ID] [int] NULL ,
[FL_SENT] [smallint] NULL ,
[FL_STAGE] [smallint] NULL ,
[FL_ERR] [smallint] NULL ,
[VREQ_ID] [int] NULL ,
[ETA] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CP_ID] [int] NULL ,
[VO_ID] [int] NULL ,
[CS_ID] [int] NULL ,
[FL_CHNG] [smallint] NULL ,
[MRG_TO_ID] [int] NULL ,
[FL_MRG] [smallint] NULL ,
[AFL_SU] [smallint] NULL ,
[ASU_DATE] [datetime] NULL ,
[ASU_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ASU_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[AFL_PM] [smallint] NULL ,
[APM_DATE] [datetime] NULL ,
[APM_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[APM_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RSP_ID] [int] NULL ,
[FL_VSLCNF] [smallint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
This is my query :
SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN, FL_MDL, FL_STAGE, PORT_ID,
RQ_CATEG, RQ_NOTE, RQ_OFF_REF FROM SPREQ
ORDER BY RQ_DATE
It seems that it loads only the first six field form the select statement
(?????)
The same thing happens whichever field I selected.
My database was before in MS Access and I used Delphi Data Pump to
transfer
it in SQL Server. Is there something wrong with that???
Thanks a lot.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:4105421f$1 (AT) newsgroups (DOT) borland.com...
If you do not add any fields at design-time could you see them on
runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
Penny Guest
|
Posted: Tue Jul 27, 2004 10:07 am Post subject: Re: Fields are missed |
|
|
Vassiliev really thank for the time you spent for me.
It now seems to work.
The difference is that I had selected SQLServer as DriverName and not MSSQL,
because once I had a problem someone told me to download this driver which
is the one for SQL Server. Have you heard something about? Which is the
difference?
Another thing is when I open the command text wizard I don't see neither
tables nor fields. Do you have any idea why this happens?
If I don't open the wizard and copy the SQL to the commandtext property at
the inspector everything is fine!
Many thanks.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote
| Quote: | This works in my test:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
SQLConnection1.DriverName := 'MS SQL';
SQLConnection1.LibraryName := 'dbexpmss.dll';
SQLConnection1.VendorLib := 'oledb';
SQLConnection1.GetDriverFunc := 'getSQLDriverMSSQL';
//Place correct values here
SQLConnection1.Params.Values['DataBase'] := 'XXX';
SQLConnection1.Params.Values['OS Authentication'] := 'True';
SQLDataSet1.SQLConnection := SQLConnection1;
SQLDataSet1.CommandText := 'SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN,
'
+
'FL_MDL, FL_STAGE, PORT_ID, RQ_CATEG, RQ_NOTE, RQ_OFF_REF ' +
'FROM SPREQ ORDER BY RQ_DATE';
SQLDataSet1.Active := True;
Memo1.Clear();
for i:=0 to SQLDataSet1.Fields.Count-1 do
Memo1.Lines.Add(SQLDataSet1.Fields[i].FieldName);
end;
Does it work for empty table (just retype CREATE TABLE statement to get
empty table without indeces etc.)? Is it possible that you (your
username/password used for connection) do not have enhough rights to view
some columns?
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:41060d7d (AT) newsgroups (DOT) borland.com...
This is the create table :
CREATE TABLE [dbo].[SPREQ] (
[ID] [int] NOT NULL ,
[VSL_ID] [int] NULL ,
[RQ_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_DATE] [datetime] NULL ,
[RQ_OFF_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_OFF_DATE] [datetime] NULL ,
[RQ_OFF_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PORT_ID] [int] NULL ,
[RQ_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_STATUS] [smallint] NULL ,
[RQ_CATEG] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FL_MDL] [smallint] NULL ,
[DATE_IN] [datetime] NULL ,
[USERIN_ID] [int] NULL ,
[DATE_UPD] [datetime] NULL ,
[USERUPD_ID] [int] NULL ,
[SPPRTY_ID] [int] NULL ,
[FL_SENT] [smallint] NULL ,
[FL_STAGE] [smallint] NULL ,
[FL_ERR] [smallint] NULL ,
[VREQ_ID] [int] NULL ,
[ETA] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CP_ID] [int] NULL ,
[VO_ID] [int] NULL ,
[CS_ID] [int] NULL ,
[FL_CHNG] [smallint] NULL ,
[MRG_TO_ID] [int] NULL ,
[FL_MRG] [smallint] NULL ,
[AFL_SU] [smallint] NULL ,
[ASU_DATE] [datetime] NULL ,
[ASU_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ASU_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[AFL_PM] [smallint] NULL ,
[APM_DATE] [datetime] NULL ,
[APM_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[APM_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RSP_ID] [int] NULL ,
[FL_VSLCNF] [smallint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
This is my query :
SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN, FL_MDL, FL_STAGE, PORT_ID,
RQ_CATEG, RQ_NOTE, RQ_OFF_REF FROM SPREQ
ORDER BY RQ_DATE
It seems that it loads only the first six field form the select
statement
(?????)
The same thing happens whichever field I selected.
My database was before in MS Access and I used Delphi Data Pump to
transfer
it in SQL Server. Is there something wrong with that???
Thanks a lot.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:4105421f$1 (AT) newsgroups (DOT) borland.com...
If you do not add any fields at design-time could you see them on
runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
Its me again.
I' m trying to test dbexpress in order to see if it is what I need.
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
Viatcheslav V. Vassiliev Guest
|
Posted: Wed Jul 28, 2004 5:48 am Post subject: Re: Fields are missed |
|
|
To see what driver is, look $(Borland Shared)dbExpressdbxdrivers.ini file
and look for driver. You should find .dll that it uses and .dll may contain
driver information.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях следующее:
news:4106295a (AT) newsgroups (DOT) borland.com...
| Quote: | Vassiliev really thank for the time you spent for me.
It now seems to work.
The difference is that I had selected SQLServer as DriverName and not
MSSQL,
because once I had a problem someone told me to download this driver which
is the one for SQL Server. Have you heard something about? Which is the
difference?
Another thing is when I open the command text wizard I don't see neither
tables nor fields. Do you have any idea why this happens?
If I don't open the wizard and copy the SQL to the commandtext property at
the inspector everything is fine!
Many thanks.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:4106231a$1 (AT) newsgroups (DOT) borland.com...
This works in my test:
procedure TForm1.Button1Click(Sender: TObject);
var
i: Integer;
begin
SQLConnection1.DriverName := 'MS SQL';
SQLConnection1.LibraryName := 'dbexpmss.dll';
SQLConnection1.VendorLib := 'oledb';
SQLConnection1.GetDriverFunc := 'getSQLDriverMSSQL';
//Place correct values here
SQLConnection1.Params.Values['DataBase'] := 'XXX';
SQLConnection1.Params.Values['OS Authentication'] := 'True';
SQLDataSet1.SQLConnection := SQLConnection1;
SQLDataSet1.CommandText := 'SELECT ID, RQ_DATE, RQ_REF, VSL_ID,
DATE_IN,
'
+
'FL_MDL, FL_STAGE, PORT_ID, RQ_CATEG, RQ_NOTE, RQ_OFF_REF ' +
'FROM SPREQ ORDER BY RQ_DATE';
SQLDataSet1.Active := True;
Memo1.Clear();
for i:=0 to SQLDataSet1.Fields.Count-1 do
Memo1.Lines.Add(SQLDataSet1.Fields[i].FieldName);
end;
Does it work for empty table (just retype CREATE TABLE statement to get
empty table without indeces etc.)? Is it possible that you (your
username/password used for connection) do not have enhough rights to
view
some columns?
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32 +
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее:
news:41060d7d (AT) newsgroups (DOT) borland.com...
This is the create table :
CREATE TABLE [dbo].[SPREQ] (
[ID] [int] NOT NULL ,
[VSL_ID] [int] NULL ,
[RQ_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_DATE] [datetime] NULL ,
[RQ_OFF_REF] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
,
[RQ_OFF_DATE] [datetime] NULL ,
[RQ_OFF_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[PORT_ID] [int] NULL ,
[RQ_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RQ_STATUS] [smallint] NULL ,
[RQ_CATEG] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[FL_MDL] [smallint] NULL ,
[DATE_IN] [datetime] NULL ,
[USERIN_ID] [int] NULL ,
[DATE_UPD] [datetime] NULL ,
[USERUPD_ID] [int] NULL ,
[SPPRTY_ID] [int] NULL ,
[FL_SENT] [smallint] NULL ,
[FL_STAGE] [smallint] NULL ,
[FL_ERR] [smallint] NULL ,
[VREQ_ID] [int] NULL ,
[ETA] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[CP_ID] [int] NULL ,
[VO_ID] [int] NULL ,
[CS_ID] [int] NULL ,
[FL_CHNG] [smallint] NULL ,
[MRG_TO_ID] [int] NULL ,
[FL_MRG] [smallint] NULL ,
[AFL_SU] [smallint] NULL ,
[ASU_DATE] [datetime] NULL ,
[ASU_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[ASU_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[AFL_PM] [smallint] NULL ,
[APM_DATE] [datetime] NULL ,
[APM_NAME] [varchar] ( COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[APM_NOTE] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL ,
[RSP_ID] [int] NULL ,
[FL_VSLCNF] [smallint] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
This is my query :
SELECT ID, RQ_DATE, RQ_REF, VSL_ID, DATE_IN, FL_MDL, FL_STAGE,
PORT_ID,
RQ_CATEG, RQ_NOTE, RQ_OFF_REF FROM SPREQ
ORDER BY RQ_DATE
It seems that it loads only the first six field form the select
statement
(?????)
The same thing happens whichever field I selected.
My database was before in MS Access and I used Delphi Data Pump to
transfer
it in SQL Server. Is there something wrong with that???
Thanks a lot.
"Viatcheslav V. Vassiliev" <support (AT) oledbdirect (DOT) com> wrote in message
news:4105421f$1 (AT) newsgroups (DOT) borland.com...
If you do not add any fields at design-time could you see them on
runtime?
I.e. just set command text and call SQLDataSet1.Active := True.
Send your CREATE TABLE and query here.
//------------------------------------------
Regards,
Vassiliev V. V.
http://www.managed-vcl.com - using .Net objects in Delphi for Win32
+
ADO.Net
http://www.oledbdirect.com - The fastest way to access MS SQL
Server,
MS Jet (Access) and Interbase (through OLEDB)
"Penny" <pennyargyrou (AT) hotmail (DOT) com> сообщил/сообщила в новостях
следующее:
news:410505bc (AT) newsgroups (DOT) borland.com...
Its me again.
I' m trying to test dbexpress in order to see if it is what I
need.
The question is, I use a SQLDataSet and when I call method Add all
fields
only some fields appears and many fields of the Select statement
are
missed.
What am I doing wrong?
I checked it with many table (single or joined) but it does the
same
thing.
(Delphi 7 - SQLServer)
Thanks.
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|