excel generel odbc error 1004 Cordele Georgia

Address 205 Third District Rd, Unadilla, GA 31091
Phone (229) 322-8033
Website Link

excel generel odbc error 1004 Cordele, Georgia

You can obtain the completed connection string by examining the value of the Connection property. If the query isn't valid, the Refresh method fails with the SQL Syntax Error exception. I am facing the similar problem (the one shown below by CLR).. asked 1 year ago viewed 2317 times active 1 year ago Related 2Excel VBA 2010 - Command buttons stop working with multiple sheets selected0Excel 2010 Run-Time error '91'1Run time error 1004

Cancel Red Flag SubmittedThank you for helping keep Tek-Tips Forums free from inappropriate posts.The Tek-Tips staff will check this out and take appropriate action. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework. Unless this method is called, the QueryTable object doesn't communicate with the data source. Truth in numbers How to mount a disk image from the command line?

I found where someone said it might have to do with dates? My "Error Trapping" setting is "Break on unhandled errors".....if my User's computer has a different setting could that be the reason? (He's tied up right now so I can't check his The program works fine on my computer, but when my user tries to run > > it on his computer, (same versoion of Excel, 2000), he gets the following > > I almost have this working but I'm getting stuck on this ...

The program works fine on my computer, but when my user tries to run it on his computer, (same versoion of Excel, 2000), he gets the following error. The real strange thing is why it does not work on my machine, but on the guys next to me it does? Selection.QueryTable.Refresh BackgroundQuery:=False Does this tell you something? The time now is 03:18 AM.

Are independent variables really independent? Nothing has changed from 2007 to 2010 in regards to this so if changing the property does not fix the issue there is something else going on such as part of How? because i'm having the same issue and can't find the reason why it doesn't store the "SERVER" parameter..

more stack exchange communities company blog Stack Exchange Inbox Reputation and Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed You will see your connection string and SQL. But now, I can't even debug. TechCenter   Sign in United States (English) Brasil (Português)Česká republika (Čeština)Deutschland (Deutsch)España (Español)France (Français)Indonesia (Bahasa)Italia (Italiano)România (Română)Türkiye (Türkçe)Россия (Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)  Home20132010Other VersionsLibraryForumsGallery Ask

After Microsoft Excel makes a successful connection, it stores the completed connection string so that prompts won't be displayed for subsequent calls to the Refresh method during the same editing session. Should say something like Runtime error 1004: followed by more description - that will help narrow down the problem. –AxGryndr Apr 22 '13 at 16:20 Run-time error '1004': General RE: Run-time error '1004' General ODBC Error SkipVought (Programmer) 9 Sep 10 13:02 oh and one other thing:What VERSION of Excel? Microsoft MVP 2006-2011 Office Development FAQ (C#, VB.NET, VB 6, VBA) Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET If a post has helped you then Please Rate

Please take my word that the unaltered code has the " at the end. The VBA is copy and pasted and only the list object table name is changed i.e. But it is relevant, since the reason for writing it like this was to make it easier to read. Can a Legendary monster ignore a diviner's Portent and choose to pass the save anyway?

Go to the regional settings in the control panel and check the date formats Feb 1 '08 #6 reply Message Cancel Changes Post your reply Join Now >> Sign in The program works fine on my computer, but when my user tries to run > it on his computer, (same versoion of Excel, 2000), he gets the following > error. > However I have changed various parts of the example provided to something slightly more generic as the select statement goes on a while. Hello.

more hot questions question feed lang-vb about us tour help blog chat data legal privacy policy work here advertising info mobile contact us feedback Technology Life / Arts Culture / Recreation All contents Copyright 1998-2016 by MrExcel Consulting. Not the answer you're looking for? I changed my connection string to be: cn = "ODBC;Driver=SQL Server;Server=serverName;Database=dbName;Trusted_Connection=yes;" and it worked like a charm.

ronaksinghwadhwa, Jul 10, 2013 #8 Advertisements Show Ignored Content Want to reply to this thread or ask your own question? I tried On Error Resume Next to get the query to skip any errors and move to the next part but that didn't help. Why are so many metros underground? Here is the snippet of code: Expand|Select|Wrap|Line Numbers WithActiveSheet.QueryTables.Add(Connection:=_ "ODBC;DSN=ADW;UID=CurUser;APP=MicrosoftOffice2003;WSID=CP040;DATABASE=DataWarehouse;Trusted_Connection=Yes"_ ,Destination:=Range("A1")) .CommandText=Array(_ "SELECTDISTINCTSTRAT_All_View.EvSDate"&Chr(13)&""&Chr(10)&"FROMDataWarehouse.dbo.STRAT_All_ViewSTRAT_All_View"&Chr(13)&""&Chr(10)&"WHERE(STRAT_All_View.EvSDate>{ts'2005-03-0100:00:00'})") '"SELECTDISTINCTSTRAT_All_View.EvSDate"&Chr(13)&""&Chr(10)&"FROMDataWarehouse.dbo.STRAT_All_ViewSTRAT_All_View"&Chr(13)&""&Chr(10)&"ORDERBYSTRAT_All_View.EvSDateDESC") .name="QueryfromADW" .FieldNames=True .RowNumbers=False .FillAdjacentFormulas=False .PreserveFormatting=True .RefreshOnFileOpen=False .BackgroundQuery=True .RefreshStyle=xlInsertDeleteCells .SavePassword=False .SaveData=True .AdjustColumnWidth=True .RefreshPeriod=0 .PreserveColumnInfo=True .RefreshBackgroundQuery:=False Thanks for any

I would > remove some unecessary line in the command until you get it to work. > First > try on the working computer to eliminate as many unecessary items as Also check that the network connection...if the file is found over a network.. excel vba odbc runtime share|improve this question edited May 6 '13 at 22:06 Undo♦ 18.4k157399 asked Apr 22 '13 at 16:03 lance 26115 Error 1004 is generic error but go to VBA menu Tools - Options - General - >> > Error >> > Trapping. >> > >> > "CLR" wrote: >> > >> > > Hi All......... >> >

Join your peers on the Internet's largest technical computer professional community.It's easy to join and it's free. Removing elements from an array that are in another array How to add an sObject to a sublislist? Thanks to those that responded. Sheets("DataQuery").Selectreportdate = ActiveSheet.Range("B1").ValueRange("A3").SelectWith Selection.QueryTable.Connection = Array(Array( _"ODBC;DSN=DSN201 ;Description=JPdb;UID=minedata;PWD=1xx$F;APP=Microsoft® Query;DATABASE=Power;Network=" _), Array("DBMSSOCN;Address=,1433")).Sql = Array(reportdate).Refresh BackgroundQuery:=FalseEnd WithI have not had any luck googling the '1004' error, it seems that it could be many

Join them; it only takes a minute: Sign up run time error 1004 general odbc error refresh backgroundquery false up vote 0 down vote favorite I have a working VBA code The program works fine on my computer, but when my user > >> > > tries to run > >> > > it on his computer, (same versoion of Excel, 2000),