title: sql: Scan error on column index 0, name "": unsupported Scan, storing driver.Value type int64 into type *main.SMSBlast?
body: <p>I'm now try restful api, where column SequenceID not auto incerement because on purpose  ,my problem is with library gorm when I count like this countSequenceId := db.Debug().Table("SMSBlast2").Count(&amp;smsblast1) , result is sql: Scan error on column index 0, name "": unsupported Scan, storing driver.Value type int64 into type *main.SMSBlast </p>
  
  <pre><code>package main
  
  import (
      "encoding/json"
      "fmt"
      "github.com/gorilla/mux"
      "github.com/jinzhu/gorm"
      _ "github.com/jinzhu/gorm/dialects/mssql"
      "log"
      "net/http"
      "strconv"
      "time"
  )
  
  type SMSBlast struct {
      SequenceID   int `gorm:"primary_key";column:"SequenceID"`
      MobilePhone string `gorm:"column:MobilePhone"`
      Output  string  `gorm:"column:Output"`
      WillBeSentDate *time.Time `gorm:"column:WillBeSentDate"`
      SentDate *time.Time `gorm:"column:SentDate"`
      Status *string `gorm:"column:Status"`
      DtmUpd time.Time `gorm:"column:DtmUpd"`
  }
  
  func (SMSBlast) TableName() string {
      return "SMSBlast2"
  }
  
  
  func insertSMSBlast(w http.ResponseWriter, r *http.Request){
      fmt.Println("New Insert Created")
      db, err := gorm.Open("mssql", "sqlserver://sa:@localhost:1433?database=CONFINS")
      if err != nil{
          panic("failed to connect database")
      }
      defer db.Close()
  
  
      vars := mux.Vars(r)
      mobilephone := vars["mobilephone"]
      output := vars["output"]
  
      var(
          smsblast1 SMSBlast
      )
      countSequenceId := db.Debug().Raw("SELECT COUNT (*) FROM SMSBlast2").Scan(&amp;smsblast1)
      fmt.Println(countSequenceId)
      msg, err :=  json.Marshal(countSequenceId)
      if err != nil{
          fmt.Println(err.Error())
      }
  
  
  
      sequenceid1,_ := strconv.Atoi(string(msg))
      fmt.Println("SequenceID : " , sequenceid1)
  
      smsblasts := SMSBlast{SequenceID: sequenceid1,MobilePhone: mobilephone,Output:output, DtmUpd: time.Now()}
      prindata := db.Create(&amp;smsblasts)
      fmt.Println(prindata)
  }
  
  
  func handleRequests(){
      myRouter := mux.NewRouter().StrictSlash(true)
      myRouter.HandleFunc("/smsblaststest",allSMSBlasts).Methods("POST")
      myRouter.HandleFunc("/smsblaststestInsert/{mobilephone}/{output}", insertSMSBlast).Methods("POST")
      log.Fatal(http.ListenAndServe(":8080",myRouter))
  
  }
  
  func main(){
      fmt.Println("SMSBLASTS ORM")
      handleRequests()
  }
  </code></pre>