Error handler not catching SQL Server Connection failure

Access 2003.

I've created my own Linked Table manager for use in several of my 
applications.  It is running fine when I use Windows authentication, or when 
I use a valid userid and password, but when I try to log in with an invalid 
userid/password, I get a Microsoft SQL Server Login error message which is 
not handled by my error handler.  The message looks like:

Connection failed:
SQLState:'01000'
SQL Server Error: 2
[Microsoft][ODBC SQL Server Driver][Shared Memroy]ConnectionOpen 
(Connect()).
Connection failed:
SQLState: '08001'
SQL Server Error:17
{Microsoft][ODBC SQL Server Driver][Shared Memory] SQL Server does not exist 
or access denied.

When I click OK, it pops ut a SQL Server Login dialog box.  I want to 
replace this process with my own error handling, but Access is not trapping 
the SQL Server error.  Is there any way to get around this so I can ensure 
that the user is entering the connection info into my application? 


0
Dale
2/4/2008 12:58:24 AM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
684 Views

Similar Articles

[PageSpeed] 23

Hi,
it looks like that you are trying to link table with wrong login/password. 
Before doing this - check that connection is ok running a pass-through query 
for example, then you can bring your own error message and login screen

-- 
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com

"Dale Fye" <dale.fye@nospam.com> wrote in message 
news:eqOwQksZIHA.504@TK2MSFTNGP02.phx.gbl...
> Access 2003.
>
> I've created my own Linked Table manager for use in several of my 
> applications.  It is running fine when I use Windows authentication, or 
> when I use a valid userid and password, but when I try to log in with an 
> invalid userid/password, I get a Microsoft SQL Server Login error message 
> which is not handled by my error handler.  The message looks like:
>
> Connection failed:
> SQLState:'01000'
> SQL Server Error: 2
> [Microsoft][ODBC SQL Server Driver][Shared Memroy]ConnectionOpen 
> (Connect()).
> Connection failed:
> SQLState: '08001'
> SQL Server Error:17
> {Microsoft][ODBC SQL Server Driver][Shared Memory] SQL Server does not 
> exist or access denied.
>
> When I click OK, it pops ut a SQL Server Login dialog box.  I want to 
> replace this process with my own error handling, but Access is not 
> trapping the SQL Server error.  Is there any way to get around this so I 
> can ensure that the user is entering the connection info into my 
> application?
> 

0
Alex
2/4/2008 7:19:59 AM
hi Dale,

Dale Fye wrote:
> I've created my own Linked Table manager for use in several of my 
> applications.  It is running fine when I use Windows authentication, or when 
> I use a valid userid and password, but when I try to log in with an invalid 
> userid/password, I get a Microsoft SQL Server Login error message which is 
> not handled by my error handler.  
Sure? The error indicates that to server instance could not be found and 
  it wasn't possible to create a connection. This should depend on the 
server name not on your user credentials.



mfG
--> stefan <--
0
Stefan
2/4/2008 9:15:23 AM
Reply:

Similar Artilces:

MS Exchangeal Errors, Event:8331
And I have this problem too. More details needed. zehner arnold wrote: > And I have this problem too. ...

Error 6: Overflow Error at HQ
I am getting this error when processing a 401 worksheet on 5 of my 6 stores. 1 of the stores processes correctly. I can process any other worksheet fine, it is only the 401 that causes this error. I am stumped. Any ideas? ...

MS Visual Basic error message
Whenever I try to enter a formula in cell, I get this MS Visual Basic warning: " Can't find project or library." After I click "OK", I can enter the formula in the cell. How can I get rid of this message? Thanks, CMA ...

PO inquiry error
When my user tries to do an inquiry on a PO they get the message "Violation of primary key constraint 'PK##2025444'. Cannot insert duplicate key in object 'dbo.##2025444.' When they hit OK they get the message: "The stored procedure popSelectPODocInquiry returned the following results: DBMS: 2627, Microsoft Dynamics GP: 0. We are on GP 9.0. Can someone point me in the right direction? I am guessing you have duplicates in the open and history tables. Have you tried running the checklinks on the Purchasing History and Purchasing Transactions? I would try ...

date error
hi i have 2 problem. 1) iam using a vlookup formula, but when there is no value in the cell the cell shows the ( 0 for date and jan for month) 0-jan. but i want to be 0 instead of the 0-jan, why its happening, 2) i have a database upto 2000 subscriber paying monthly sub. some customer pays twice in month. i used vlookup formula . it shows only one date , is there possible to show all the date in one cell, so i can know how many times that customer paid the subs in these month. if instead if vlookup i used the sumif formula its add the date and i got the wrong date. so pls help. rega...

annoying error
we have a custom web app which works fine within the testing environment and another webserver within the network, when we move the web app to crm server all the dropdownlists, listboxes stops working. steps taken: 1. copy 'projectname' folder into c:\inetpub\wwwroot\cms\projectname 2. configure it as an iis application - the dropdownlists get populated with data - its set to autopostback = true but when you select a value from the dropdown list it returns null sample code: .... if (!Page.IsPostBack) { this.ddlampm.Items.Add("AM"); this.ddlampm.Items.Add("PM"); ...

Error Trapping
Hi all I have a table with a required field set to yes. How do I capture the system generated responce when the user fails to enter data in that field? TIA johnb Use the Error event of the form to catch these engine-level errors. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "johnb" <johnb@discussions.microsoft.com> wrote in message news:B020CCA8-8ECB-4A32-8E78-ED53092E4E01@microsoft.com... > Hi all > I have a table with a required field se...

Rules Error: Can't move message, No other rules will work
We recently upgraded from Windows NT 4.0 Server and Microsoft Exchange Server 5.5 to Windows 2000 Server and Exchange 2000. Since then the rules I set up in Outlook 2000 have degenerated in performance. Before we upgraded I was getting the Rules Error message Can't move message to folder and You don't have permission... for Junk and Adult mail. Since the upgrade, in addition to these error messages, the problem with the rules have progressed to none of my rules to move messages from specific senders to their respective folders are working. I can't find anything specif...

Error 13 #2
Hi Chip Thanks for answering I really dont know, but to rows hides before the error occours. I have no problem run this macro in office 2000, nor in 95 on m computer, but on other computer with 97 I get this problem. I have discovered that the code works fine also in 97 if column A i empty. //Thoma -- Jonsso ----------------------------------------------------------------------- Jonsson's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=547 View this thread: http://www.excelforum.com/showthread.php?threadid=27501 ...

Workflow paused without errors
Hi, all of my workflows are not executed. Workflow monitor displays them as paused, but the log doesn't contain any information what's wrong. The event log contains an error message for each workflow and reffers to the workflow monitor where no additional information can be found. I have also experienced this behaviour with past beta versions - maybe I am missing an important step in the process of designing workflows? Any help is highly appreciated! Thank you. Regards Andreas I dont think that you have provided enough info to troubleshoot this. If you can export one of th...

Error in IIf Expression
I have an expression in my query to create a concatenated text depending upon the value of control Measurements. If the control is skipped - meaning that there are no Measurements, I'd like to return an expression to that extent. Here's my expression: Expr1: IIf([Measurements]=Null,"The damage is not such that it has a measurement height.","The height of the damage is " & [Measurements] & " inches.") I'm not getting an error, but I'm not getting it to read the True statement. It reads even the Null value as False and return...

CRM 4.0 upgrade Failed error: An item with the same key has already been added.
Hi All Upgrade to CRM 4.0 failed with error message "Action Microsoft.Crm.Setup.Server.ImportDefaultDataAction failed. An item with the same key has already been added." Can any one help?. upgrade fails when trying to upload opportunity object data. I have used very long fields names in customizing opportunity object such as new_gonogo1dowehavetheskillstoresponname new_gonogo1dowehavetheskillstorespon Can this be a cause as upgrade program is truncating fields name and this way creating a duplicate? Thank you for your help. Regards Kesh Patel Error Dump: 10:07:47|Verbose| Q...

SMTP virtual server stopped working
Dear All, I use the SMTP Virtual server on Windows XP Professaional with SP3 for my custom application, where I can send mails from my Outlook client to the SMTP server and my custom application picks up the eml files from the Drop folder (C:\Inetpub\mailroot\Drop). It had been working fine till I installed the latest windows update last thursday (28th Jan 2010). Now when i send a mail from Outlook, and request for a delivery report, i get the message that reads "Your message has been successfully relayed to the following recipients ...", but my mails do not reach the drop...

"Interface message error"
I have configured Sharepoint services to send e-mail the mail is sent after any new document get's updated in a site Server used is windows 2008 standard server and The client has outlook 2007 and windows 7 But when i tryed to open the mail , i receive "Interface message error" and the mail could'nt be oppened. Any idea. ...

Restore Exchange databases to different existing server in same admin group
I am trying to find some information about restoring an Exchange 2003 database to a different server that's already up and running with it's own databases in the same org. Here's the situation: We have two servers, EX1 and EX2. Both are running Exchange 2003sp1 on Windows 2003 sp1. Both servers are in the same admin group. Each server has two storage groups defined, and each storage group has one database. Each storage group and each database has unique names & folder locations. The databases are backed up nightly (on line) using the Veritas NetBackup, an exchange aware...

Route specific mails whose mailbox is not local, to another server
We set up an Exchange 2003 Ent. responsible for delivery on the mail domain "company.com". However, we would like our Exchange to route mails addressed to three specific addresses (i.e. user1@company.com user2@company.com and user3@company.com) to another internal mail server (not an Exchange one, this time). Do you have an idea on how we could do that? TIA, NeXTstep Dear TIA, It looks like a shared SMTP address scenario. check out the link below. http://support.microsoft.com/kb/321721/ Regards, Kashif "NeXTstep" wrote: > We set up an Exchange 2003 Ent. ...

Error message 09-06-07
I am getting an error message when I attempt to compact and repair the back end of a database. It is, "You attempted to open a database that is already opened exclusively by user 'medinaa' on machine '123456'. Try again when the database is available." The problem is I am the user working on that machine. I tried a different user who had admin priveleges on a different macine (after shutting mine down) and the error message followed the user to that machine. It said, "You attempted to open a database that is already opened exclusively by user 'Johnso...

Confiuring e-mail for MS exchange server
I am now using my system to connect, thru a vpn, to my company. In oder to get my e-mail I need to connect to an exchange server. I dont have that option, just pop3 smpt and imap. Any suggestions Thanks for any info Joe What version of Outlook are you using? If 98 or 2000, check the mode under help->about, second line should say Internet Mail Only or Corporate or Workgroup. >-----Original Message----- >I am now using my system to connect, thru a vpn, to my >company. In oder to get my e-mail I need to connect to an >exchange server. I dont have that option, jus...

Error message when double-clicking .msg files
I have a user who throughout the years has been dragging emails to her network home drive, saving them as .msg files. It seems that some she can double-click and they open fine in Outlook, but others give her the following error "The command line argument is not valid. Verify the switch you are using." How do I fix that? I've only seen ones that don't work FYI. Rich;112663 Wrote: > I have a user who throughout the years has been dragging emails to her > network home drive, saving them as .msg files. It seems that some she > can > double-cli...

CRM 3.0 Desktop client installed on terminal Server is not working
I am having trouble getting the CRM 3.0 Desktop client to properly work through a terminal services connection. If I connect to the Terminal server with an account that has local administrative rights on the Terminal server, then RPC to the CRM server and run “LightClient.msi” everything works great. CRM continues to work even after I remove the user from the local administrators group. However, I cannot make a regular user account work. I would like to avoid making every TS user a local admin. Here is the pertinent info: I have a working installation of CRM 3.0 running on a Windows...

Restoring Exchange Information Store
Hello Everyone: I'm having some issues restoring an Exchange Information Store. Platform: Windows 2000 Advanced Server w/ SP3 Exchange: Exchange 2000 The plan is to restore the database to another server in another domain. But for some reason, when I attempt to run the restore with BackupExec 8.6, I receive an "Access is Denied" error message. Let me explain what's been done. Let's say we have a domain called "Production.Com" and a seperate forest called "exchangerecovery.com". A DNS structure has been established by creating secondary DNS server...

catch the system date
does any one know how to catch the system date? I wanna create a field which can insert the system date into the field automaically, just like the field of "Createon" in the Case. thanks See the SQL Function GETUTCDATE() "jerry" <jerry@discussions.microsoft.com> wrote in message news:04A24E3A-0925-4061-AF68-FE5293ACA924@microsoft.com... > does any one know how to catch the system date? > I wanna create a field which can insert the system date into the field > automaically, just like the field of "Createon" in the Case. > > thanks you c...

Multi level BOM report in sql
I want to write a script to generate the multi level BOM report outside of Great Plains report writer. I dont know to get the components at all levels with their correct position and levels. If anyone has worked on this, I will appreciate the help. Thanks in advance haribhagat@hotmail.com ...

removing AD from exch 5.5 server HELP PLEASE
ok one of my DCs blew up. I was informed it was best for me to dcpromo /forceremoval my troubled machine and then dc promo it to get the AD running again. I have no problem doin that with the exception that the machine is running Exchange 5.5. So what im thinking here is the following: idea A --------- 1)dcpromo /forceremoval 2)on reboot, boot it to safemode with networking to prevent the exchange services to boot (or should i just disable them before i reboot it?) 3)dcpromo and make it a replica again? idea B -------- 1) dcpromo /forceremoval 2) on reboot, boot it to safemode with network...

what are Compile Errors on Starting program?
How do i stop the above from happening They're caused by errors in code. But you'll have to do some detective work to find the workbook with the problem. Chip Pearson has some notes on how to diagnose startup errors: http://www.cpearson.com/excel/StartupErrors.htm And Jan Karel Pieterse has more notes: http://www.jkp-ads.com/Articles/StartupProblems.asp qs1 wrote: > > How do i stop the above from happening -- Dave Peterson ...