| |
|
|
Tommy | I try to gelungenem Connect with the Firebird embedded Version Datensätze anzufügen and experimentiere at a Übung from the Profanbuch. where lying because my Error in the enclosed Source? I have thrice the same SQL-Statement on The data base gesendet, the Statement with the variables (:Varname$,..) end with the Error Message -Column does nor belong to referenced table-, during the two others Statements go through. who can me thereby on The Sprünge help? CompileMarkSeparation $I firebird.inc
declare Exec$,db&, HST_Name$, HST_Ort$
window 500,500
cls
var fbDLL& = fbUseDLL("fbclient.dll")
' Datenbank erzeugen, falls nicht vorhanden, und Verbindung herstellen
ifnot fileexists("3TSDatabase.fdb")
db& = fbCreate("SYSDBA", "masterkey", "3TSDatabase.fdb")
else
db& = fbInit("SYSDBA", "masterkey", "3TSDatabase.fdb")
endif
Set("Errorlevel", -1)
Exec$="DROP TABLE Haltestelle"
fbSQLExec(db&, Exec$, 0)
Set("Errorlevel",0)
Exec$="create table Haltestelle (HST_Name CHAR(40), HST_Ort CHAR(40), XKoord NUMERIC(10,8), YKoord NUMERIC(10,8))"
fbSQLExec(db&, Exec$, 0)
HST_Name$="aus dem Name$-Dummy"
HST_Ort$="aus dem Ort$-Dummy"
'Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES ('slkjlskjlsfkjsf','lkhjljlkjlkj')" 'Statement 1 -OK
'Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES (:HST_Name$,:HST_Ort$)" 'Statement 2 Fehler- Column does nor belong to referenced table
Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES ('"+HST_Name$+"','"+HST_Ort$+"')"'Statement 3 -OK
fbSQLExec(db&, Exec$, 1)
Exec$="SELECT * FROM Haltestelle"
fbSQLExec(db&, Exec$, 1)
Listbox$("Tabelle Haltestelle",2)
fbDone(db&)
fbFreeDll(fbDLL&)
waitinput
end
|
|
|
| |
|
|
|
E.T. | without now time angestrengt drüber to To think: type time on The Doppelpunkte with :HST_Name$,:HST_Ort$ .
time so probiert ?? CompileMarkSeparationExec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES (HST_Name$,HST_Ort$)" > |
|
|
| XProfan X2Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 01/13/14 ▲ |
|
|
|
|
Tommy | Have I everything probiert: colon omit : same Error Message, quotation marks settle etc.. unfortunately no Result. The default with the Doppelpunkten comes from the book: program dead easy with XProfan, part3 : SQL-Databases with Firebird. could otherwise unfortunately no fountain discover. I can but not believe, that one whom String beforehand through Zusammensetzen form must, around the data into data base To get..... |
|
|
| |
|
|
|
Tommy | is Done: have it with Help of/ one response in the Forum of Jörg Sellmeyer found: Solution see code. shining another little trickreich with the many Anführungsstrichen..... CompileMarkSeparationExec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES ('" + HST_Name$ + "','" + HST_Ort$ + "')" > |
|
|
| |
|
|
|
E.T. | there wundert me but, the itself Dietmar not To word reports. it ought to still XProfan - Firebird - specialist his |
|
|
| XProfan X2Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 01/15/14 ▲ |
|
|
|
|
Tommy | i think I mach there something wrong. The strings have I on The beschriebene point to Firebird gequetscht, but numerische data can only on nachstehende point into data base loading. either I give The data directly in the INSERT-String on or I fetch tappt im dunkeln in a String-Variable (as number ??) and commit tappt im dunkeln then directly of/ one numerischen Datenbankvariable. an numerische Variable in the Insert-String To transfer isn't possible. Liegt's on whom quotation marks? I look to Time by the Systematik not yet through. Gibt's weiterführende Literatur about? there would one council the Specialists helpful..... CompileMarkSeparationTabellendefinition:
Exec$="create table Haltestelle (HST_Name CHAR(40), HST_Ort CHAR(40), XKoord FLOAT, YKoord FLOAT)"
VarDef:
HST_KoordX$=23.66666
HST_KoordY$=10.45555
Insertstring:
Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort,XKoord) VALUES ('" + HST_Name$ + "','" + HST_Ort$ + "',10.45555, 23.66666)"
oder
Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort,XKoord,YKoord) VALUES ('" + HST_Name$ + "','" + HST_Ort$ + "','" + HST_KoordX$ + "','" + HST_KoordY$ + "')" n>
|
|
|
| |
|
|
|
E.T. | |
|
| XProfan X2Grüße aus Sachsen... Mario WinXP, Win7 (64 Bit),Win8(.1),Win10, Win 11, Profan 6 - X4, XPSE, und 'nen schwarzes, blinkendes Dingens, wo ich das alles reinschütte... | 01/15/14 ▲ |
|
|
|