package main

import (
	"database/sql"
	"fmt"
	"log"
	_ "github.com/denisenkom/go-mssqldb"
)

func main() {
	connString := "server=192.168.10.61;user id=pond;password=Ehongmd2025;database=EHONGDB;encrypt=disable"
	db, err := sql.Open("sqlserver", connString)
	if err != nil {
		log.Fatal(err)
	}
	defer db.Close()

	rows, err := db.Query("SELECT TOP 1 * FROM hps_ctmain")
	if err != nil {
		log.Fatal(err)
	}
	defer rows.Close()

	cols, _ := rows.Columns()
	fmt.Println("Columns in hps_ctmain:")
	for _, col := range cols {
		fmt.Printf("- %s\n", col)
	}
}
