vb and access using SHAPE command


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: vb and access using SHAPE command

Hybrid View

  1. #1
    Join Date
    Dec 2006
    Posts
    8

    vb and access using SHAPE command

    i'm trying to use this shapy statement in my vb6 program which uses access, i don't know if i'm doing it right but when i try to execute the recordset with this shape statement it seems like it doesn't know what a shape statement is. it keeps telling me that a sql statemtn should start with select, delete, update.

    how do i use a shape statement in vb with access, and how do i pass a parameter to the parent from a text box

    here is my shape statement and the code i have

    myShape = " SHAPE {select * from tblCustomer where intTicketNum=?} AS cmdJobs APPEND (( SHAPE {select * from tblVisit order by intVisitNum Desc} AS cmdJobVisit APPEND ({SELECT * FROM `tblJobOrder`} AS cmdJobOrder RELATE 'visitID' TO 'visitID') AS cmdJobOrder) AS cmdJobVisit RELATE 'intTicketNum' TO 'intTicketNumb') AS cmdJobVisit"


    With myCmd
    .CommandText = myShape
    .Parameters.Append .CreateParameter("o", adVarChar, adParamInput, 10, txtTicketNum.Text)
    .CommandType = adCmdText

    Set .ActiveConnection = connShape
    Set rs = .Execute
    End With

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    Did you look at the example Ron linked to in your previous thread? http://forums.devx.com/showthread.php?t=157806

    Compare your connection string with the one in that example.
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Dec 2006
    Posts
    8
    i know but that's not my question , the link Ron Weller gave me is using SQL database, my question was how to let access database deal with the shape command, but it's ok i found the answer now i have to do a connection string with provider Provider = MSDataShape

Similar Threads

  1. Replies: 60
    Last Post: 09-13-2002, 05:41 PM
  2. They created J#, why couldn't they do VB#?
    By Thomas Eyde in forum .NET
    Replies: 290
    Last Post: 12-22-2001, 02:13 PM
  3. Access & SQL Server
    By David Jones in forum Database
    Replies: 0
    Last Post: 08-31-2001, 12:22 PM
  4. Replies: 0
    Last Post: 12-20-2000, 12:22 PM
  5. VB, Regional Settings, and Access
    By Greg Rothlander in forum VB Classic
    Replies: 4
    Last Post: 12-13-2000, 12:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center