Because Pb is a product of Sybase, it follows the 255 varchar type limitation of Sybase Database. However, the varchar of SQL Server has reached 8000, while the DBM OF Pb can only process 255. I personally think there are the following solutions to this problem. Welcome to the discussion.
1. Use ODBC connection instead of direct database connection.
2. If you still use direct connection, you can use text to replace varchar (500)
3. If you still use direct connection or varchar (500), you can use the following methods:
Data Table (n_id integer not null PK, c_content varchar (500) null ):
To write data to a database, you can create a DW. The data source is the n_id and c_content of the table.
At this time, you will find that the limit of c_content is 255. you can change the data window export, edit the SRD file, change the limit of c_content to 500, and import it back to enter the 500 character and update it successfully.
Note: If you directly change the limit value to 500, an error is returned when you enter a character greater than 255.
If you want to read the database, take varchar (1000) as an example:
Define four calculation columns:
Select column1, column2 ,......, substring (REM, 1, Len (REM)/4) C1, substring (REM, Len (REM)/4 + 1, Len (REM)/4) C2, substring (REM, Len (REM)/4*2 + 1, Len (REM)/4) C3, substring (REM, Len (REM)/4*3 + 1, len (REM)/4) C4,
In addition, the calculated column C5 = C1 + C2 + C3 + C4
A better way to pass the test:
// Profile
Sqlca. DBMS = "MSS Microsoft SQL Server 6.x"
Sqlca. Database = "master"
Sqlca. logpass = 'sa'
Sqlca. servername = "data"
Sqlca. logid = "sa"
Sqlca. autocommit = false
Sqlca. dbparm = ""
Connect;
String ls_c
Select cast (unit as text) into: ls_c from TB;
MessageBox (string (LEN (ls_c), ls_c)
Select unit into: ls_c from TB;
MessageBox (string (LEN (ls_c), ls_c)
Result