need an access bit of code translated to sql / C# dot net

  • Thread starter Thread starter garyusenet
  • Start date Start date
G

garyusenet

the following bit of code set to an onclick for a button in access
works fine.

Dim id As String

id = DLookup("[name]", "beta", "[Value] = " & DMin "[VALUE]", "beta"))

MsgBox id

However trying to get this to work for my new sql database in c# is
hard! first i tried to find a substitute for dlookup function, no avail
- then i discover the dmin is also non existent in VB or VC# - help.
Can someone convert the above code into code that will work if i attach
it to run when a button on a form in my visual c# program is clicked.
I have a database called beta with the correct fields allready attached
to my visual c application.

thanks,

Gary.
 
You may want to try something like this for your sql statement:

SELECT name FROM beta WHERE name = (SELECT min(name) from beta)

SandiB
 
Back
Top