Inserting a single record in C++

Is there a way in C++ to insert a single record to a kdb database without using a q string to insert the data like this one `var1113 insert(2008.05.01T11:00:09.500 ; 130619736). I have found this example:I kdbSocketHandle = khpu(“localhost”, 5010, “username”);if (kdbSocketHandle != 0){ K row = knk(3, ks((S)“ibm”), kf (93.5), ki(300)); k(-kdbSocketHandle, “.u.upd”, ks((S)“trade”), row, (K)0); closesocket(kdbSocketHandle);}But I don?t understand it.

X-Mailer: Apple Mail (2.930.3)…float datetime=…; // your timestamp hereint value=…;k(- kdbSockaetHandle ,“insert”,ks(ss(“var1113”)),knk(2,kz(datetime),ki(value)),(K)0);k(kdbSocketHandle,“”,(K)0); // flush buffers…On 18 May 2009, at 16:12, Jespr wrote:>> Is there a way in C++ to insert a single record to a kdb database with> out using a q string to insert the data like this one `var1113 insert> (2008.05.01T11:00:09.500 ; 130619736). I have found this example:>> I kdbSocketHandle = khpu(“localhost”, 5010, “username”);> if (kdbSocketHandle != 0)> {> K row = knk(3, ks((S)“ibm”), kf (93.5), ki(300));> k(-kdbSocketHandle, “.u.upd”, ks((S)“trade”), row, (K)0);> closesocket(kdbSocketHandle);> }>> But I don?t understand it.>> >

thank you for your very quick answer.On 18 Maj, 15:18, Felix Lungu <felix.lu…> wrote:> …> float datetime=…; // your timestamp here> int value=…;> k(-> kdbSockaetHandle> ,“insert”,ks(ss(“var1113”)),knk(2,kz(datetime),ki(value)),(K)0);> k(kdbSocketHandle,“”,(K)0); // flush buffers> …>> On 18 May 2009, at 16:12, Jespr wrote:>>>>>> > Is there a way in C++ to insert a single record to a kdb database with> > out using a q string to insert the data like this one `var1113 insert> > (2008.05.01T11:00:09.500 ; 130619736). I have found this example:>> > I kdbSocketHandle = khpu(“localhost”, 5010, “username”);> > if (kdbSocketHandle != 0)> > {> > ? ?K row = knk(3, ks((S)“ibm”), kf (93.5), ki(300));> > ? ?k(-kdbSocketHandle, “.u.upd”, ks((S)“trade”), row, (K)0);> > ? ?closesocket(kdbSocketHandle);> > }>> > But I don?t understand it.- Skjul tekst i anf?rselstegn ->> - Vis tekst i anf?rselstegn -</felix.lu…>