mattn / go-adodb

Microsoft ActiveX Object DataBase driver for go that using exp/sql
http://mattn.kaoriya.net/
MIT License
142 stars 36 forks source link

db.Query error with vfpoledb connection #19

Open alialtun14 opened 9 years ago

alialtun14 commented 9 years ago

I get the following error when I want make parametric sql query after connecting the Vfp database // The Error Message : "select sql: statement expects 0 inputs; got 1"

The error occurs at this line rows, err := db.Query("select id, name, created from foo where id=?", 1)

Similarly the same error (select sql: statement expects 0 inputs; got 3) take place following line

stmt, err := tx.Prepare("insert into foo (id, name, created) values (?, ?, ?)") ... _, err = stmt.Exec(i, "Test", time.Now())

The driver is I use Microsoft OLE DB Provider for Visual FoxPro 9.0 : http://www.microsoft.com/en-us/download/details.aspx?id=14839

alialtun14 commented 9 years ago

The sample vfpoledb connection code is

https://gist.github.com/alialtun14/9f662dc783a0b4817a01

mattn commented 9 years ago

Thanks. I'll look into it in later.

dkeza commented 8 years ago

I receive same error with Vfp database: sql: expected 0 arguments, got 2

Are there any news?

mattn commented 8 years ago

Where can I download the driver for Windows7 64bit?

dkeza commented 8 years ago

There is no 64bit driver. Only 32bit driver can be downloaded from here: https://www.microsoft.com/en-us/download/details.aspx?id=14839 And Go 32bit must be used.

thr27 commented 6 years ago

There is a 64 Bit driver from sybase http://devzone.advantagedatabase.com/dz/content.aspx?Key=20&Release=19&Product=14&Platform=14

Advantage OLE DB Provider Release 11.1 for Windows 64-bit You can use it to read/write foxpro dbf