@Wayne, not at the moment, as for testing, I simply do it this way:
I define my database fields in webdialogs as db_, for instance, db_Street_ChineseName_txt
When use pressed save, I pass the webdialog to a method to help me loop through all the fields:
AssignScreentoRecord (byref rec as DatabaseRecord, w as webdialog)
Dim c, pos1, pos2, pos3 as Integer
Dim FieldLabel as String
Dim TableName as String
Dim ColumnName as String
Dim FieldType as String
Dim obj as WebObject
for c = 0 to w.ControlCount - 1
FieldLabel = w.ControlAtIndex©.name
if mid(FieldLabel, 1, 3) = “db_” then //is a databse field
pos1 = InStr(1, FieldLabel, “")
pos2 = InStr(pos1+1, FieldLabel, "”)
pos3 = InStr(pos2+1, FieldLabel, “_”)
TableName = mid(FieldLabel, pos1+1, pos2-pos1-1)
ColumnName = mid(FieldLabel, pos2+1, pos3-pos2-1)
FieldType = mid(FieldLabel, pos3+1, 5)
obj = w.ControlAtIndex(c)
select case FieldType
case "txt"
rec.Column(ColumnName) =trim(DefineEncoding(WebTextField(obj).Text, Encodings.MacChineseTrad))
'rec.Column(ColumnName) =WebTextField(obj).Text
end select
end if
next
and then I call another method:
InsertRecord (TableName as string, rec as DatabaseRecord)
TableName = uppercase(TableName)
self.InsertRecord(TableName, rec)
if self.error then
msgbox(Self.Errormessage)
Return(False)
else
Return(True)
end