×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

R5 - @dblookup to utilize both a server and a local db

R5 - @dblookup to utilize both a server and a local db

R5 - @dblookup to utilize both a server and a local db

(OP)
Using a formula, how can I check to see if the database is local or on the server automatically using a @dblookup?  My main db is TestDb.nsf and it is pulling names from TestDbNames.nsf using @dblookup on dialog field name Name.  I'm trying to use an @If and checking to see if the db is local or on the server then to show what I'm looking for.  Right now, I can only get it to work one way or the other but never both.  In the notes help on specifying the server and database, it only gives examples of one or the other but never both.  If this makes any sense, could you please help?  Thank you!!!!

RE: R5 - @dblookup to utilize both a server and a local db

It makes sense : you are trying to do something that cannot be done.
The formula can very determine if the db is local or on a server. Just use

CODE

ServerName:=@Subset(@DbName;-1)
and you will get the name of the server if the db is on a server, or an empty string if the db is local.
What you must understand is that if the db is on a server, there is no way that the formula can look up anything on local.
The only way to do so is to forego the server name and hard-code the empty string in the @DbLookup formula, and that will only work if it is the client that is executing the code.

Remember that the server cannot look up anything on the client. Only the client can do so. Which means that you cannot do this in scheduled agents.

Pascal.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close