Hi I have a problem with MsSQL Server 2008 using Zeos.
ZConnection1.LibraryLocation:=ExtractFilePath(Application.ExeName)+'msdblibd.dll';
INI := TINIFile.Create(ExtractFilePath(Application.ExeName) + 'wfmag.ini');
serwer:=Ini.ReadString('polaczenie','host','localhost');
baza:=Ini.ReadString('polaczenie','baza','wfmag');
user:=Ini.ReadString('polaczenie','uzytkownik','root');
haslo:=Ini.ReadString('polaczenie','haslo_bazy','root');
snip:=Ini.ReadString('polaczenie','snip','root');
nrkontrah:=Ini.ReadString('polaczenie','nrkontrah','');
INI.Free;
If trim(serwer)='' then serwer:='localhost';
If trim (baza)='' then baza:='wapro';
If trim (user)='' then user:='sa';
If trim(haslo)='' then haslo:='Wapro3000';
Zconnection1.HostName:=serwer;
Zconnection1.Database:=baza;
Zconnection1.User:=user;
Zconnection1.Password:=haslo;
ZConnection1.Protocol:='FreeTDS_MsSQL-7.0';
try
Zconnection1.Connected:=true;
except
begin
showmessage ('Error MSSQL');
Application.Terminate;
end;
end ;
I create table like this
wapro_uwagi.SQL.Text:='IF NOT EXISTS (SELECT * FROM sysobjects';
wapro_uwagi.SQL.Text:=wapro_uwagi.SQL.Text+' WHERE name = ''uwagi'' AND xtype = ''U'') CREATE TABLE [dbo].[UWAGI]([uwagi_id] [int] IDENTITY(1,1) NOT NULL,[uwagi_kontrahent] [int] NULL,[uwagi_data] [date] NULL,[uwagi_opis] [varchar](50) NULL,[uwagi_status] [smallint] NULL,[uwagi_tresc] [text] NULL,)';
wapro_uwagi.ExecSQL;
wapro_uwagi.SQL.Text:='select * from uwagi';
wapro_uwagi.Open;
Table has been crated, but is read only with any data controls like dbgrid, dbnavigator.
Then I use SQL Server Management Studio as a same user and password I can modify this table.
What can I do wrong?
Please help me.