Mysql api調用

yjgyjgg 5月前 8942

  #include "mysql/MySql.bi"

   Dim conn as MySql ptr
   Dim res  As MYSQL_RES Ptr
   Dim row  as MYSQL_ROW
   conn = mysql_init(null)
   If conn = null Then
      Debug.Print "初始化失敗"
      Exit sub
   End If
   if mysql_real_connect(conn ,"localhost" ,"root" ,"usbw" ,"test" ,3307 ,"" ,0) = NULL Then
      Debug.Print "連接失敗"
      Exit sub
   End If
   if mysql_query(conn ,"show tables") <> 0 Then
      Debug.Print *mysql_error(conn)
   End If
   res = mysql_use_result(conn)
   If res = NULL Then
      Debug.Print *mysql_error(conn)
   End If
   ''Debug.Print mysql_num_rows(res)
   Do
      row = mysql_fetch_row(res)
      If row = NULL Then Exit Do
      Dim s as ZString Ptr ptr = row
      Debug.Print s[0][0]
   Loop
   mysql_free_result(res)
   mysql_close(conn)

因國家互聯網安全管理要求,關閉回帖功能。大家需要留言,請使用【勇芳軟件客服】即時聯系勇芳點此打開->>勇芳軟件客服
返回
聯系勇芳
一个人看的www视频播放中文_2012中文字幕电影_亚洲国产成人高清在线观看_中文字幕天堂最新版在线网