DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    43,023

    wrong number of arguments

    [Originally posted by Johm]


    wrong number of arguments used with query expression run time error 3075

    I want to simplify the following sql:

    stSQL = " SELECT customers.Customerid, customers.CompanyName,customers.afid ,customers.address, " & _
    " customers.employee,customers.city,customers.works,customers.works1,customers.home,customer s.mobi," & _
    " customers.taxid,customers.pass,customers.bulstat,customers.kindid,customers.afid

    by making something like that:


    strSQL˙ = " SELECT customers(Customerid,CompanyName,afid ,address,employee,city,works,works1,home,mobi,taxid,pass,bulstat)

    But then i receive the message wrong number of arguments run time error 3075.
    May i ask for help?

  2. #2
    Join Date
    Aug 2004
    Posts
    43,023

    Re:wrong number of arguments

    [Originally posted by m.posseth]

    this should work :-)

    strSQL˙ = "SELECT Customerid, CompanyName, afid, address, employee, " & _
    "city, works, works1, home, mobi, taxid, pass, bulstat FROM customers;"

    complete naming customers.Customerid etc etc ,should alway`s be used when joining tables in a sql query to avoid name conflicts ,,, so you could even state that the previously used way is the better way !! of doing things :-)




Bookmarks

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links