driver

package
v0.0.0-...-f09eefb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2012 License: BSD-2-Clause Imports: 5 Imported by: 0

README

Driver for database/sql

Install:
	go install

Example:

package main

import (
   "database/sql" 
   _ "odbc/driver"
   "fmt"
)

func main() {
   db, err := sql.Open("odbc", "DSN=test;")
   defer db.Close()

   stmt, err :=	db.Prepare("select name from table")
   defer stmt.Close()

   rows, err :=	stmt.Query()
   defer rows.Close()

   for rows.Next() {
       var name string

       _ = rows.Scan(&name)
       fmt.Println(name)
   }
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver struct {
}

func (*Driver) Close

func (d *Driver) Close() error

func (*Driver) Open

func (d *Driver) Open(dsn string) (driver.Conn, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL