Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
squatpump
Starting Member
1 Post |
Posted - 2005-11-23 : 05:56:56
|
Hi allI'm making an Access front-end for an existing app based on SQL Server 2000. (The Access thing makes labels... the "label wizard" supplied with the SQL Server program isn't very good.)Anyway, it works fine, but eventually it's going to be used by non-techie people. As it uses linked tables, when you first run it you get a message box similar to this popping up: Obviously the username's wrong, which makes it more complex to use. On some machines it tries to create a trusted connection automatically, and fails, and then gives you this box with "Use Trusted Connection" ticked - thus making it even harder for people to use.Ideally I don't want anyone to have to bother with this: I'm going to assume that anyone who runs the app has the authority to connect to the SQL Server database, as they'll have had to log onto the machine it's installed on. Is it possible to put something into the form's OnOpen event that passes the server, database, user & password details to SQL Server, so it all happens invisibly? I've already tried creating a file DSN on the machine it'll be used on (doesn't seem to do much) and also putting this code in as the OnLoad event:Set objConn = New ADODB.ConnectionobjConn.ConnectionString = "Driver={SQL Server};Server=[server];Database=[db];Uid=[blah];Pwd=[blah];"objConn.Open(I must admit this was a bit of a stab in the dark... it didn't work anyway)I also found this thread and tried the code but it didn't seem to work (got one of those "You entered an OnOpen expression that can't be evaluated"-type errors).Finally... I briefly investigated redoing this whole thing as an Access Project, but haven't ever used them before and don't really have the time to learn now...Any tips would be really, really gratefully received!CheersNick |
|
|
|
|
|
|