Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Multi-part identifier could not be bound

$
0
0
   

I need to load a specific data into a variable in VisualBasic but im having this probably and getting a bit frustrated with this error. I would really aprecciate any help.

Dim conn As New SqlConnection("Data Source=LUCIFERI\SQLEXPR2012;Initial Catalog=ProyectoBD;Integrated Security=True; Connection Lifetime=60; Max Pool Size=50; Min Pool Size=3")
            Dim cmd As New SqlCommand
            Dim dr As SqlDataReader
            Dim ds As New DataSet
            cmd.Connection = conn
            cmd.CommandText = "SELECT idPerfil FROM USUARIO WHERE USUARIO.correoElectronico =" & emailtxt.Text
            conn.Open()
            dr = cmd.ExecuteReader()
            ds.EnforceConstraints = False
            dts.gtipo = Convert.ToString(dr.Item("idPerfil"))

            dr.Close()


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>