Board index » delphi » Problems With Fields With more than 255 Width

Problems With Fields With more than 255 Width


2004-02-23 07:09:19 PM
delphi268
I use Delphi 7 with BDE and MS SQL Server 2000.
I have one field with 300 width (Address Varchar (300)).
In TDatabase Component i Select Drivar Name as "MS SQL".
Now i am tring to Save but it is not taking more than 255 Character.
Thank you very much.
Himanshu
 
 

Re:Problems With Fields With more than 255 Width

Himanshu,
Microsoft has depreciated it is DBLib (which the BDE's SQL Links uses) after
MS SQL 6.5 and Borland has depreciated it is BDE SQL links. Microsoft
recommends using OLE-DB (ADO) for MS SQL 7/2000 access
community.borland.com/article/0,1410,28688,00.html
community.borland.com/article/0,1410,10359,00.html
community.borland.com/article/0,1410,19694,00.html
support.microsoft.com/default.aspx
Good luck,
krf
"Himanshu Upadhyay" <XXXX@XXXXX.COM>writes
Quote
I use Delphi 7 with BDE and MS SQL Server 2000.
I have one field with 300 width (Address Varchar (300)).
In TDatabase Component i Select Drivar Name as "MS SQL".
Now i am tring to Save but it is not taking more than 255 Character.


Thank you very much.

Himanshu


 

Re:Problems With Fields With more than 255 Width

I've just come across the same sort of problem. If I was saving>255
chars, the field would convert the result to strange characters.
I've gotten around it by using a persistent field within a query. This
seems to work. ie Opening the query (a parameter query) and finding the
record, updating the field via the persistent field, then saving.
...
wqryUpdatePermitNotesSQLServer.Open;
wqryUpdatePermitNotesSQLServer.Edit;
wqryUpdatePermitNotesSQLServerNOTE.value := sTempNote;
wqryUpdatePermitNotesSQLServer.post;
wqryUpdatePermitNotesSQLServer.Close;
...
It's not perfect, but it seems to work for me.
Mick.
"Himanshu Upadhyay" <XXXX@XXXXX.COM>writes
Quote
I use Delphi 7 with BDE and MS SQL Server 2000.
I have one field with 300 width (Address Varchar (300)).
In TDatabase Component i Select Drivar Name as "MS SQL".
Now i am tring to Save but it is not taking more than 255 Character.


Thank you very much.

Himanshu