Problem in adding a column using vb 6.0

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • veer
    New Member
    • Jul 2007
    • 198

    Problem in adding a column using vb 6.0

    Hi

    can any one help by solving this probleum i am accessing mdb database and i want to alter the table . i use the following syntax but it is showing the syntax error

    squery = "alter table " & sTableName & " add bookcode varchar(10) IN '" & txtfolderpath & "\" & sArrFolder(icou nt) & "\" & sDirFolder & " '"
    dbmaster.Execut e (squery)

    please help me
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    You need to use ADOX library for any DDL .

    Comment

    • veer
      New Member
      • Jul 2007
      • 198

      #3
      Hi
      the error is still same

      Originally posted by debasisdas
      You need to use ADOX library for any DDL .

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        You need to learn SQL before trying to execute them from VB.

        Learn the basics of SQL first.

        Comment

        • lotus18
          Contributor
          • Nov 2007
          • 865

          #5
          Originally posted by veer
          Hi

          can any one help by solving this probleum i am accessing mdb database and i want to alter the table . i use the following syntax but it is showing the syntax error

          squery = "alter table " & sTableName & " add bookcode varchar(10) IN '" & txtfolderpath & "\" & sArrFolder(icou nt) & "\" & sDirFolder & " '"
          dbmaster.Execut e (squery)

          please help me
          if this is .mdb file, varchar datatype is not yet available. Check your query.

          Rey Sean

          Comment

          Working...