tried to use the
[goDBhammer.git] / src / webconnector.go
index 546341d..5fe61aa 100644 (file)
@@ -15,11 +15,18 @@ func HelloServer(c *http.Conn, req *http.Request) {
 }
 
 func main() {
-       dbibridge.dbiconnect();
-       http.Handle("/hello", http.HandlerFunc(HelloServer));
-       err := http.ListenAndServe(":12345", nil);
-       if err != nil {
-               panic("ListenAndServe: ", err.String())
-       }
+
+       var Dbconn *dbibridge.DBConnection;
+       
+       Dbconn = dbibridge.DBICreate();
+       
+       dbibridge.DBIConnect(Dbconn, "mysql", "localhost", "root", "password", "zm");
+       dbibridge.ExecSQL(Dbconn, "create table asdf (asdf int)");
+       dbibridge.DBIDisconnect(Dbconn);
+       //http.Handle("/hello", http.HandlerFunc(HelloServer));
+       //err := http.ListenAndServe(":12345", nil);
+       //if err != nil {
+               ////panic("ListenAndServe: ", err.String())
+       //}
 
 }