var
DBProc: Pointer;
DBRecData: dbrec;
Server, User, Data, Pass, Host:string;
dbsetlname(login, pchar(User), DBSETUSER);
dbsetlname(login, pchar(Pass), DBSETPWD);
dbsetlname(login, pchar(Host), DBSETHOST);
DBProc := dbopen(login, pchar(Server));
dbsetuserdata(DBProc, @DBRecData);
dbuse(dbproc,pchar(Data));
dbrec(dbgetuserdata(DBProc)^).dberr := 0;
dbcanquery(DBProc);
dbcancel(DBProc);
dbfreebuf(DBProc);
dbcmd(DBProc, pchar('insert xxx...'));
dbsqlexec(DBProc);