mysql new connection_未定义MySqlConnection

我在vb.net和mysql中是新的.

当我将Dim SQLConnection定义为MySqlConnection = New MySqlConnection时,我感到困惑.

它说未定义新的“ MySqlConnection”,但我确保已导入所需的名称空间或其他任何名称,但是我仍然有错误,我无法弄清楚问题出在哪里.

这是我的代码:

Imports MySql.Data.MySqlClient

Public Class EditInfo

Dim bednumber As String = ""

Dim patient_name As String = ""

Dim patient_age As String = ""

Dim date_of_confinement As String = ""

Dim type_of_sickness As String = ""

Dim type_of_IV_fluid As String = ""

Dim number_of_bottles As String = ""

Dim drop_rate As String = ""

Dim ServerString As String = "Server=localhost; database=patientinfo;user id=root;password=root" 'connection to phpmyadmin database

Dim SQLConnection As MySqlConnection = New MySqlConnection

Private Sub PatientInfoBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PatientInfoBindingNavigatorSaveItem.Click

Me.Validate()

Me.PatientInfoBindingSource.EndEdit()

Me.PatientInfoTableAdapter.Update(Me.PatientInfoDBDataSet.PatientInfo)

End Sub

任何帮助,将不胜感激.谢谢!我很困惑对不起XD

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值