English
Forum

Firebird embedded/XprofanX2: Error add of Datensätzen

 

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
 
01/13/14  
 




E.T.
without now time angestrengt drüber to To think:
type time on The Doppelpunkte with :HST_Name$,:HST_Ort$ .

time so probiert ??
CompileMarkSeparation
Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES (HST_Name$,HST_Ort$)"
>
 
XProfan X2
Grüß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.....
 
01/14/14  
 




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.....
CompileMarkSeparation
Exec$="INSERT INTO Haltestelle (HST_Name,HST_Ort) VALUES ('" + HST_Name$ + "','" + HST_Ort$ + "')"
>
 
01/14/14  
 




E.T.
there wundert me but, the itself Dietmar not To word reports.
it ought to still XProfan - Firebird - specialist his
 
XProfan X2
Grüß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.....
CompileMarkSeparation
Tabellendefinition:
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>
 
01/15/14  
 




E.T.
Perhaps. the: [...] 
 
XProfan X2
Grüß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  
 



Answer


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

8.010 Views

Untitledvor 0 min.
Tommy11/03/19
H.Brill02/09/17
Deaktiviert02/04/17
rquindt12/20/16
More...

Themeninformationen

this Topic has 2 subscriber:

Tommy (4x)
E.T. (3x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie