473,320 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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.

Oct 25 '05 #1
1 1164
You may want to try something like this for your sql statement:

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

SandiB

"ga********@myway.com" wrote:
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.

Oct 27 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: David | last post by:
We recently translated the backend db from Access(97) to SQL Server. We are still using Access frontends. I have an update query in the Access front end that uses a lookup table to populate...
2
by: Lance Riedel | last post by:
I was wondering if anyone has seen/knows of a solution to the following: given a document that has been translated through xsl, if you have a character offset in the translated document, can you...
4
by: Shyguy | last post by:
I have a small app that I want to distribute to users of various Operating systems from 97 to XP. Does the latest edition of Developer Edition contain the runtimes for all previous versions or do...
3
by: Lynn A. | last post by:
I have to perform an import from an excel file to Access. The file comes originally as a csv file. I have to delete some rows and columns, then change the formatting of some columns. I am using...
6
by: robin9876 | last post by:
In an Access 97 (and 2000) database that has linked tables to Oracle which is showing some fields as text when they are numbers in Oracle. In Oracle they are specified to a size e.g. Number(38)....
1
by: garyusenet | last post by:
the following bit of code set to an onclick for a button in access works fine. Dim id As String id = DLookup("", "beta", " = " & DMin "", "beta")) MsgBox id However trying to get this to...
4
by: RLN | last post by:
I have an Access2002 database that needs to connect to an Oracle Database. I connected to my Oracle DB in a simple VB6 app using no ODBC data source. How do I do the same thing using VBA in...
4
by: AViS | last post by:
Hi, I am building a language translator, that must convert input from source languages to a language neutral format in XML. This XML must be read by the target language translator and produce the...
3
tjc0ol
by: tjc0ol | last post by:
Hi guys, Can this remote price javascript code below: <script type="text/javascript" language="javascript"...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.