Connection Error Trapping

I have a probgram that works great.  I connect to a Db and run querries, but 
I canceled from the final connection today (instead of puting in the db  
password, I hit CANCEL) and my code stopped.  It jammed on the EXECUTE 
statement below. How do I either test the connection to make sure it is in 
tact?  I will exit the sub if no connection found.

Current working code:
    Set MyQDF = MyDB.CreateQueryDef("")
    MyQDF.ODBCTimeout = 800
    MyQDF.Connect = "ODBC;DSN=OTHER_DB"
    MyQDF.ReturnsRecords = False

'Delete Curr Transactions
    stSQL = stSQL & "DELETE FROM work1.CUSTOMERS; "
    MyQDF.SQL = stSQL
    MyQDF.Execute
0
Utf
2/5/2008 4:02:13 PM
access.forms 6864 articles. 2 followers. Follow

0 Replies
533 Views

Similar Articles

[PageSpeed] 35

Reply:

Similar Artilces:

Printout Problem error 2501
Hello - I've created an application in access 2003, installed it on another computer that has the following configuration: Windows XP, Office 2007, Access runtime 2003, and I've removed the access 2007 from the office package. The following error happens when the user is trying to print a report. "The action Printout was canceled, Error 2501" A message of the error handling that I've created focuses the problem on the Function "PrintNormalTas" which has the following code lines: DoCmd.OpenReport sReportName, acViewPreview, , sFilterCriter ...

Error when add new user #4
Hi, dont know when it happened. When I add new user to production MSCRM 4, there is an error message (An error Has occurred.....). However, when I try to add this user to my test CRM, it can successfully add without any problem. Both servers are running the same spec and version. I tried to add different users to production but all failed. I have set the deverror to ON but the error message still appear as An error has occurs. Apart from that, I have used CRM diagostic Tool but cannot see anything unusual from the log. I have even run the repair but effort is all wasted. Please He...

Recovery Storage Group error when trying to add database #2
Can you please tell me where I would make the change to the DN as described below? Hi, The problem is that in the distinguished name of the database there is a single parenthesis without its match. Examples of this would include: cn=Mailbox Store 1 (SG1,cn=First Storage Group,.... cn=Mailbox Store 1 (SG2),cn=Second Storage Group (TestServer,cn=... If you add the closing parenthesis and force replication of the Active Directory the "Add Databases to Recover" dialog should work properly. The problem is the LDAP request that is sent to the Domain Controller to render ...

error bars when breaking the y-axis
Jon - I think this question is directed towards you. I have implemented a version of your broken y-axis scheme. My data looks like the following: sample average avedev negative control 0.36252361 0.029793573 sample 1 3.265795907 2.878954305 sample 2 0.149275395 0.035304333 sample 3 73.57998574 2.237144009 sample 4 0.346937718 0.02837823 sample 5 4.636386221 0.089703534 sample 6 709.7039626 16.33742397 sample 7 1.157628293 0.667009325 negative control ...

Excel Formula Error for No Good Reason
I don't know why, but this formula will not stop giving me an error in Excel 2003. =IF( $A8 <> "", B8 * E8, IF( ROW(H7) <> 1, IF( G8 = "Subtotal", SUM( H$2:H7 ), IF( LEFT(G8, 3) = "Tax", ROUND( $J$1 * H7, 2), IF( G8 = "Total", INDIRECT( ADDRESS( ROW(H8)-2, COLUMN(H8) ) ) + H7, IF( G8 = "Depr", SUM( INDIRECT( "G2:"&ADDRESS( ROW(H8) - 4, COLUMN(G7),4) ,TRUE) ), "" ) ...

Custom error code when XSD validation fails?
Hi, Is there any way to tell an XSD Schema that you want custom error codes for particular validation failures in an XML document? To show what I mean, here's an example: XSD excerpt: <xs:element name = "EmployeeID"> <xs:simpleType> <xs:restriction base = "xs:string" > <xs:length value = "3"/> <xs:pattern value = "[0-9]{3}"/> </xs:restriction> </xs:simpleType> </xs:element> XML excerpt: <EmployeeID>1234</EmployeeID> When the XML fails to validate aga...

Connectivity issues in Oulook 2003
I am setting up a laptop for one of our users and I installed Office 2003. When I get to set up her account in Outlook, it is unable to connect to the exchange server, after it resolves her name in the Check name section. I have already uninstalled and reinstalled Office 2003. The DNS is working fine on that machine. I am signed in as her to the machine, which exists in AD. I am able to use OWA on the machine and using her login w/o any problems. Does anyone have any thoughts as to why I am unable to connect to the Exchange server? I have 2003 on my laptop and it works just fine. Please...

Error 0x800ccc13 Send&Receive
I use outlook to check the e-mail on the domain that I have purchased and have had for 3 or 4 years now. When I check my e-mail in Outlook there are 3 address that I check; two of them pick-up fine, however they aren't my main e-mail address. I've had this problem for the last couple weeks, but I've been busy and haven't had time to look into it. I have completely removed the problem e-mail and put it back in but with no luck. The only thing different with this e- mail is that it is also the administration account for my FTP setup and to check e-mail instead of ent...

'07 Large Operation Error (Delete / Insert Rows and/or Columns)
Help! I was so excited to have '07 until... I have a very simple worksheet in a work book - This very simple worksheet takes up 78 rows and 16 columns. Minimals formats / formulas etc. I would like to insert additional rows but I get the error message which says "Large Operation. The operation you are about to perform affects a large # of cells and may take a significant amount of time to complete. Are you sure you want to continue? Note: This operation will be performed in 60 seconds if no response is received". I have tried to select "OK" as well a...

Tender validation error.
When client enters any type of credit in store operations, they get the following error: Tender validation. Cannot perform printer validation. No slip printer is available. There is a receipt printer and it is working, any idea on how we fix this. I have found nothing in the RMS kb. Thanks ...

Receiving the following error when trying to send or reply to an email
OUTLOOK caused an invalid page fault in module <unknown> at 0000:74680000. Registers: EAX=00ff3c28 CS=017f EIP=74680000 EFLGS=00010206 EBX=00ff34d4 SS=0187 ESP=0056e988 EBP=0056ebb4 ECX=00690056 DS=0187 ESI=00000000 FS=326f EDX=000124b7 ES=0187 EDI=00000000 GS=0000 Bytes at CS:EIP: Tried everything I can think of including removing office 2000-sr1 completely and reinstalling. Nothing seems to make a difference. OS is Win98 2nd Edition patched to current. Any help would be appreciated. Thanks, Rick Anyone? ...

Spelling/grammar error notification in Word for Mac 2004
Version: 2004 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel Is there a way to set up Word so that a sound will indicate an error as you are typing? Word is already set up that way, it will already alert you with a "bong!" if you hit an illegal keystroke. But it cannot alert you if what you type is not true, or not what you wanted, because it cannot know what you wanted to say :-) And if it were to alert me for every spelling and grammar mistayke I made, it would never shut up! So it won't do that either :-) Cheers On 1/12/09 4:50 PM, in artic...

Custom Web Service: Soap error in WhoAmI() Method
Hello, Here is the issue: CRM 1.2 installed on Windows 2003 SP1 on the "CRM" domain. I have created a web service that automatically share a case within a team. The web service is called from a Post URL in a workflow rule at the creation of the case. The paramater passed to the Web Service is "incidentid" I have tested the web service locally, by calling the URL in Internet Explorer (logged with my CRMAdmin) and it works perfectly. Now if I try to test from the CRM app locally or remotely (still using my CRMAdmin) it does not work. From the Web service trace I can ...

Connect two seperate companies
We have merged with another company and need to link our exchange servers. Both companies have seperate NT domains, and both use exchange 5.5. Our e-mail addresses are different. 1st we want to connect the 2 servers so that users can log onto their mailboxes from either site and also share calenders across sites. 2nd we want to bring the e-mail addresses in-line so that their e-mail addresses become ours but their old ones continue to function at the same time for a month or two. We have a routed 10mbs link between the 2 sites. We don't have trusted domains yet, but I think I can just ...

connecting "ethernet networks" to excede "8 objects"
I've read in the help files there is a way to get pas the 8 object limit on the ethernet network tool I've tried it but the instructions in help aren't very clear. any assistance would be appreciated! Thank you! The shape is limited to eight connections, but can be changed through some delicate surgery to have more connections. The easiest way is to drop a second (or third ethernet shape) and place them in a row. John... Visio MVP Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm Need VBA examples? http://www.mvps.org/visio/VBA.htm Common Visio Quest...

Heap corruption error.
Hi all, I'm battling a heap corruption error. I know you're probably thinking it's either a buffer overrun or writing to a freed block. I've gone after enough of these to know that's what it usually is, and I know how to find and fix such errors. However this one appears to be different, and I'll explain why. First of all, I'm using MS Visual Studio 6.0. When the error manifests, the debug heap's linked list of allocated objects is corrupted. More specifically, following the block's pBlockHeaderNext pointers quickly takes me to heap memory that is not...

Firewall Engine is not running error
Hi sbs 2003 premium with isa 200 sp2. I ran ISA best practices analyser and I get the below error; The Firewall Engine (fweng) is not running. None of the ISA Server services is running. When I run sc query fweng on command line I get; [SC] EnumQueryServicesStatus:OpenService FAILED 1060: When I run net start fweng I get; The service name is invalid. What is the problem and how can I resolve it? Thanks Regards Hi John: I gave one response in your next post. Adding to that, I wonder if this SBS is RTM, and if the SBS SP1, and subsequent patches and up...

E-mail error 0x800ccc79
Hello... The other day I tried sending an e-mail message with Outlook 2000 to TVO Ontario (a public TV station in Canada) but it wouldn't go, saying that the recipient was rejected by the server and the error given was 0x800ccc79. I could send this e-mail to that address using either Outlook Express 6.0 or Netscape 7.1. I could send other e-mails with Outlook 2000 to myself or other addresses. Today, I received that same error message when I tried to send a message to someone in a federal government office here in Ottawa. I did a Detect and Repair on Outlook 2000 and it seems to hav...

Error msg
I am trying to work from a db that is on a shared drive. When I open it from my desk, I get a message that says that it contains a missing or broken reference to the file "OWC10.DLL" version 1.1 It doensn't happen at any other computer. Now, my computer is running an older OS than the others. is that the problem? do I need to Download something? Thanks! :) On Tue, 18 Mar 2008 06:07:01 -0700, Angie <Angie@discussions.microsoft.com> wrote: Find this DLL on your computer, and compare it with one on a working computer. Most likely you would have to copy it over from th...

"Encountered an error..."
I'm new to the group, so if this subject has come up a hundred times I apologize. There can't be a more useless error message than "Money has encountered an error and must close. Try again later." I can't even save a transaction. This is a new problem...Money has worked just fine for the last 18 months. Bob Gardner In microsoft.public.money, Bob Gardner wrote: >I'm new to the group, so if this subject has come up a hundred times I >apologize. > >There can't be a more useless error message than "Money has encountered an >error and must...

Errors when opening .csv files
I have just finished upgrading to Office XP, and when I attempt to open a .csv file in Excel, I receive the following error message: "Microsoft Excel can't load the required converter. Microsoft Excel can't install the necessary files due to Windows Installer error 1605. This action is only valid for products that are currently installed." After I OK this error message, the file opens normally. Still, it'd be nice to avoid the message. The message is identical whether I double-click the .csv file to open it or I attempt to open it from within Excel. I have re-ru...

MSXML5.0:Validate an XML Docxumenet (C++)-Fatal Error C1010
Hi all, I have a VC++ .NET 2003 - Windows XP Pro PC. I created a Win32 console application in my VC++ .NET 2003 and copied validateDOM.cpp, books.xml and books.xsd (see the attached files below) from Microfost MSDN Library for my project "validateXML". When I did "Build" on my project, I got the following fatal error C1010: c:\Documents and Settings\SHC\My Documents\Visual Studio Projects\valoidateDOM\valoidateDOM.cpp(273): fatal error C1010: unexpected end of file while looking for precompiled header directive. Please help and tell me what went wrong in my "Bui...

Microsoft CRM 1.2 Unspecified Error
I have an installation of Microsoft CRM which was running fine until a problem with the domain controller running on an HP server, for some reasons the domain controller refused to boot properly until I found out that an HP service was causing the error, the HP service was disabled the the DC was fine, after that MSCrm refused to come up, the Security service refused to start and was coming up with an Unspecified Error. I checked the dependencies and nothing related to the HP service that was disabled. Any help would be appreciated ...

Import Error
I am trying to import a Quicken .qfx file from TIAA-CREF. I found that only one account out of three makes into Money. I looked at the file and found each account was enclosed in <INVSTMTTRNRS> </INVSTMTTRNRS> statements. I also found that the account that was imported was the last one. I cut the first account and pasted it after the last account. I then imported the file again. This time the account that I pasted so it became the last account was imported. The account that I had previously imported was removed. I think there is a bug with the Quicken import routine. ...

addition error-excel bug???
In Excel2000, I ahve the follwing numbers I am trying to add: -30584.010000000000000 30585.600000000000000 1.590000000000150 why does adding these two amounts add a 150 on the right end. I am inputting to 2 decimals then formatting to add the zeros. My answer should be 1.590000000000000. Any ideas??? All floating point, base-10 numbers cannot be represented exactly when converting to base-2 binary format. You realize you can't represent the fraction 1/3 exactly in base-10. 1.59 must fall into this category -- can't be represented exactly in base-2. On Tue, ...