Как добавить запись в таблицу MSSQL
Материал из Фабиус wiki
Программа добавления одной записи в таблицу, на сервере MSSQL
login := 'fabius' password := '13082012_fabius' base := 'ShetIzdCod' server_name := '192.168.32.84\SQLEXPRESS' server_ip := '192.168.32.84'
connection_string := [ ; Provider = SQLOLEDB.1 ;; Persist Security Info = true ;; User ID = ] + login + [ ;; password = ] + password + [ ;; Initial Catalog = ] + base + [ ;; Data Source = ] + server_name + [ ;; Use Procedure for Prepare = 1 ;; Auto Translate = true ;; Packet Size = 4096 ;; Workstation ID = ] + server_ip + [ ;; Use Encryption for Data = false ;; Tag with column collation when possible = false ]
sql := [ Insert into Table_1( DATE, COD3, COD4, COD16, COD32, COD195, COD206 ) VALUES ( '2016-04-04', 1, 1, 1, 1, 1, 1 ) ]
OpenADOQuery( connection_string, sql )