Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. waynedp

    Foxpro SQL Help

    I am trying to obtain the longest full name with a zip+4 SELECT TOP 1 * FROM waynedb ORDER BY FULLNAME WHERE LEN(RTRIM(FULLNAME)) = (SELECT MAX(LEN(RTRIM(FULLNAME))) FROM waynedb WHERE LEN(RTRIM(FULLNAME)) > 0 AND LEN(RTRIM(ZIP4)) > 9) I am receiving records without zip+4
  2. waynedp

    SQL Help

    I have the following SQL statement. What I am trying to do is find the longest length address that has a zip+4. I know there may be many address that have the same length. My problem is I am getting addresses that do not have a zip+4. Any help would be greatly appreciated: SELECT TOP 1...
  3. waynedp

    Need help with an SQL Statement

    Yes, I did that before submitting my question, I am attach the length, but did not get any records, than I tried on another database and it worked. I submitted question because I thought my zip code length wasn't working. And Dave I am only selecting Top 1 for maximum length. Thanks guys
  4. waynedp

    Need help with an SQL Statement

    Hi, Current I am using the following statement to get the longest full name: SELECT TOP 1 CITY FROM MYDB ORDER BY SQNCNMBR, WHERE LEN(CITY) = (SELECT MAX(LEN(CITY)) FROM MYDB, WHERE LEN(CITY)) > 0) What I am trying also to add is a check for zipcode > 5 Please advice
  5. waynedp

    FoxPro Excel Automation

    Thank you so much Olaf, Originally I stated this project in VBA, was converting in over to FoxPro because of some issues with fix length files, which I think I can do in FoxPro, again, Thank you, and thanks to everyone else for your assistance.
  6. waynedp

    FoxPro Excel Automation

    Hi Olaf, The error code is OLE error 0x80020003: member not found. I have check the workbook properties, under data connections connection string is :Provider=VFPOLEDB.1;Data Source="C:\USERS\WAYNE.PERKINS\DOCUMENTS\VISUAL FOXPRO PROJECTS\QA"; sql is SELECT COUNT(*) FROM ("29484Q1.DBF"), and...
  7. waynedp

    FoxPro Excel Automation

    Hello Olaf, I have tried your suggestion, I am still receiving an error QryTable.Refresh = .T. oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls") oSheet = oWorkbook.Sheets(1) oSheet.Activate sDatabase = GETFILE("DBF","","",0,"Select [Q] File Database To Process") sConnString =...
  8. waynedp

    FoxPro Excel Automation

    I am thinking, something wrong with my connection string oSheet = oExcel.ActiveSheet sDatabase = GETFILE("DBF","","",0,"Select [Q] File Database To Process") sConnString = "OLEDB;Provider=VFPOLEDB.1;Data Source=" + sDatabase + ";" sSqlString = "SELECT COUNT(*) FROM " + sDatabase oQryTable =...
  9. waynedp

    FoxPro Excel Automation

    And Thank you JRB-Bldr, Now the light bulb went off on you comment, and thanks again Vilhelm
  10. waynedp

    FoxPro Excel Automation

    Thank you so much Vilhelm, I just tried your suggestion oExcel.Visible = .T. oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls") It worked, now just on more question sSqlstring = "SELECT COUNT(*) FROM " + sDatabase oQryTable = oSheet.QueryTables.Add("OLEDB;Provider=VFPOLEDB.1;Data Source=" +...
  11. waynedp

    FoxPro Excel Automation

    First, I want to deal with one issue at time, yes, I have read the Workbooks.Open Method, and yes, I have read Excel - How to do Automation from VFP, have done automation before oExcel = Createobject("Excel.Application") With oExcel .Workbooks.Open("C:\Users\WDP\Documents\Visual FoxPro...
  12. waynedp

    FoxPro Excel Automation

    Sorry, I meant oQryTable.Refresh = .T. is when I get error from on the QueryTable, and yes I have tried other folders, like I said, I am able to add a workbook, but not open an existing work, as for the refresh, how am I to get my data displayed if I can refresh
  13. waynedp

    FoxPro Excel Automation

    I am having 2 minor problems, first, I can't open an excel workbook: oExcel = CreateObject("Excel.Application") oWorkbook = oExcel.Workbooks.Open("C:\WDPQA.xls") I have even tried oWorkbook = oExcel.Application.Workbooks.Open("C:\WDPQA.xls") The funny thing is I will comment out the oWorkbook...

Part and Inventory Search

Back
Top