Sending a parameter to a Q call using C# interfaces

Received: by 10.100.132.14 with SMTP id f14mr1718245and.17.1230930984792; Fri,
02 Jan 2009 13:16:24 -0800 (PST)
Date: Fri, 2 Jan 2009 13:16:24 -0800 (PST)
X-IP: 98.113.133.89
User-Agent: G2/1.0
X-Google-Token: gUg9hQwAAAB0ijeWQhoI_eKyWhDc4E-J
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1;
.NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; Tablet PC 2.0; .NET CLR
3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618),gzip(gfe),gzip(gfe)
Message-ID: <26427af2-ffef-4eed-ac80-2f293bb072b4@t26g2000prh.googlegroups.com>
Subject: Sending a parameter to a Q call using C# interfaces
From: Scott W <scott.weinstein>
To: “Kdb+ Personal Developers”
X-Google-Approved: charlie@kx.com via web at 2009-01-03 08:02:08

I’m using the newer C# interface to connect to kdb+.

using (IConnection connection = new Connection
(“localhost”, 5001))
{
connection.Run(@“\l sp.q”);

// this works
obj = connection.Query(“?[s;enlist (=;city;enlist<br>london);0b;()]”);
this does not
obj = connection.Query(“?[s;enlist (=;city;enlist x);<br>0b;()]}", "london”);
}

What am I doing wrong?

</scott.weinstein>

X-Mailer: Apple Mail (2.930.3)

> this does not
> obj = connection.Query(“?[s;enlist (=;city;enlist x); \> 0b;()]}", "london”);
>
> What am I doing wrong?
you miss the starting { of a lambda
and you don’t need the forlondon in this case

connection.Query(“{?[s…]}”,“london”)

Regards,
Attila