This commit is contained in:
Lunny Xiao 2013-12-20 15:55:34 +08:00
parent b778bfce82
commit 9ee32711ba
2 changed files with 9 additions and 5 deletions

View File

@ -1,9 +1,12 @@
package xorm
//
// +build windows
import (
_ "code.google.com/p/odbc"
_ "github.com/mattn/go-adodb"
"testing"
_ "github.com/lunny/godbc"
)
/*
@ -12,7 +15,7 @@ utf8 COLLATE utf8_general_ci;
*/
func newMssqlEngine() (*Engine, error) {
return NewEngine("odbc", "driver={SQL Server};Server=127.0.0.1;Database=xorm_test; uid=sa; pwd=1234;")
return NewEngine("odbc", "driver={SQL Server};Server=192.168.20.135;Database=xorm_test; uid=sa; pwd=1234;")
}
func TestMssql(t *testing.T) {

View File

@ -1618,9 +1618,10 @@ func (session *Session) byte2Time(col *Column, data []byte) (outTime time.Time,
ssd := strings.Split(sdata, " ")
sdata = ssd[1]
}
/*if len(sdata) > 8 {
if len(sdata) > 8 {
sdata = sdata[len(sdata)-8:]
}*/
}
fmt.Println(sdata)
st := fmt.Sprintf("2006-01-02 %v", sdata)
x, err = time.Parse("2006-01-02 15:04:05", st)
} else {