<div dir="ltr"><div>Hello, I have a SQLite3 database and I want to send the records by lNet components.</div>
<div> </div>
<div>I need to create a string from the fields of the table.</div>
<div> </div>
<div>I have this:</div>
<div> </div>
<div> with DataModule1.Db do<br> begin<br> TableName := 'Item';<br> if not TableExists then<br> begin<br> FieldDefs.Clear;<br> FieldDefs.Add('Code',ftAutoInc); // ftAutoInc con ftString hce falta establecer una clave primaria PrimaryKey := 'Code';<br>
FieldDefs.Add('Description',ftString);<br> FieldDefs.Add('Stock',ftBoolean);<br> CreateTable;<br> end;<br> end;</div>
<div> </div>
<div>records:</div>
<div>1, Description1, False</div>
<div>2, Description2, False</div>
<div>3, Description3, True</div>
<div> </div>
<div>and I want to create a string, for example:</div>
<div> </div>
<div>1#Description1#False</div>
<div> </div>
<div>to send this by lNet.</div>
<div> </div>
<div>I do this:</div>
<div> </div>
<div>sequence := Db.FieldValues['Code'] + <a href="mailto:'@'">'#'</a> +<br> Db.FieldValues['Proveedor'] + <a href="mailto:'@'">'#'</a> +<br> Db.FieldValues['Almacen'] + <a href="mailto:'@'">'#'</a> +<br>
Db.FieldValues['Unidades'];</div>
<div> </div>
<div>but I get the following error: Project raised exception class 'RunError(231)'.</div>
<div> </div>
<div>Two things:</div>
<div> </div>
<div>1.- Which is the correct form to generate the string?</div>
<div>2.- It is necessary to beforehand know the name the fields to generate the string?</div>
<div> </div>
<div>I want something like this:</div>
<div> </div>
<div>for i:= 1 to Db.FieldCount do</div>
<div> Db.FieldValues[i];</div>
<div> </div>
<div>Regards.</div>
<div> </div>
<div> </div></div>