DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL_insert in Diadem 8

Hello,
 
I would like to copy the path of a measurement file in an access-Database with the command "SQL_insert" (I'm still working with Diadem 8):
Problem: The Path contains an apostrophe:
T3:='c:\va's_neu\test';
SQL_INSERT('mes_Leistung_konst','Ablablagepfad',T3);
produces an error message
 
I tried the following commands:
SQL_Connect('Versuchsauftrag_be','user1','',''); 
SQL_INSERT('mes_Leistung_konst','VANr','va's');
SQL_Disconnect;
-> error mesage: Fehler in Autosequenz - Übersetzung in Zeile: 3 - Autosequenz - Texte müssen in Hochkommata eingeschlossen sein
 
SQL_Connect('Versuchsauftrag_be','user1','',''); 
SQL_INSERT('mes_Leistung_konst','VANr',"va's");
SQL_Disconnect;
-> error mesage:
Fehler im ODBC-Befehl: [Microsoft][ODBC Microsoft Access Driver] Syntax error in string in querry expression 'va's)'. SQL: INSERT INTO mes_Leistung_konst (VANr) VALUES (va's)
 
Is there al solution for this Problem? Perhaps with the SQL_ExecDirect-command?
 
Thanks a lot!
 
Markus
 
0 Kudos
Message 1 of 3
(3,230 Views)

Hello Markus!

SQL_INSERT('Tabelle1','Test',"'va''s'");

worked on a 'Text' field in an Access DB.

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 3
(3,218 Views)

Hello Matthias,

That works,

thank you very much!

Markus 

 

0 Kudos
Message 3 of 3
(3,202 Views)