CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Join Date
    Jul 2009
    Location
    Kuwait
    Posts
    170

    Re: INDEX a table in VB.NET

    This is the more specific error detail
    Code:
    ""Errors reported by ADO
    (1) Error#: -2147217900
    	Desc. : Command is missing required clause.
    	Source: Microsoft OLE DB Provider for Visual FoxPro
    	Native Error: 221
    	SQL State: 
    	Help Context: 0
    	Help File: 
    "
    what is wrong with
    Code:
              fcn.Execute("INDEX  on sale.dbf (Brand)")
    one more thing to add .
    I tried something like this
    Code:
    fcn.Execute("use sale.dbf; index on (price,brand) to prc")
    This didnt throw any error or exception. But i am expecting a .cdx file named prc.cdx to be generated. But that is not happening. So i am not able to verify whether the indexing has happened or not.
    Last edited by makdu; November 24th, 2009 at 12:41 AM.

  2. #17
    Join Date
    Jul 2009
    Location
    Kuwait
    Posts
    170

    Re: INDEX a table in VB.NET

    I have made some progress
    Code:
    fcn = New ADODB.Connection
    fcn.ConnectionString = "provider=VFPOLEDB.1;Data Source=" &tablefolderpath
    fcn.Open()        
    fcn.Execute("Execscript('Use sale exclusive'+CHR(13)+'Index on BRAND tag idx1')")
    This genearate a sale.cdx file. but I am expecting a idx1. file generation as we gave idx1 as the tag name

  3. #18
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: INDEX a table in VB.NET

    As I've said before, you'd have to USE FoxPro to create the index files. It can probably be scripted, though. The problem is that it's probably not like any other language.

    Paradox 3.5 had PAL, one of the greatest languages available at the time. The Windows version lost it
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured