textbox vs db 
Author Message
 textbox vs db

Por favor: Don't send bitmaps in mail. The text of the exception is all we
need.
On line 605 of your program you're trying to get a variable typed as Integer
to accept the value "gabriel". The program expects a number--you're passing
a string.
Que pasa?

--
________________________________
William (Bill) Vaughn, Author, Trainer, Mentor
Microsoft Pacwest Regional Director, MVP
"ADO.NET and ADO Examples and Best Practices for VB Programmers--2nd
Edition" (ISBN: 1-893115-68-2)
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
________________________________

Quote:
> Hola! en respuesta al mail donde me daban la solucin, me aparece el
> siguiente mensaje de error, no se si se deba a k estoy usando un
> sqlconnection y un sqldataadapter.

> Muchsa gracias de antemano y espero puedan ayudarme.



Sun, 22 May 2005 07:33:19 GMT  
 textbox vs db
Por k en el siguiente cdigo me dice : type sqlconnection is not defined al
igual que en el sqlcommand

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Try ' Trap problems during the open

cn = New SqlConnection1("server=server;database=bo_produccion;integrated
security=sspi")


cn)


Dim strLogin As Object

cn.Open()

strLogin = cmd.ExecuteScalar

If strLogin Is Nothing Then

MsgBox("No es usuario")

Else

MsgBox("Usuario encontrado")

End If

Catch ex As Exception

MsgBox(ex.ToString)

Finally

cn.Close()

End Try

End Sub

No se si esto se deba a k estoy usando un oledbdataadapter y un
sqldataadapter, como puedo corregir esto?

Gracias!



Sun, 22 May 2005 07:29:24 GMT  
 textbox vs db
OK LO SIENTO POR LO DEL BITMAP.
EN EL CODIGO ESTOY CORRIGIENDO LO SIGUIENTE:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Try ' Trap problems during the open

cn = New
SqlClient.SqlConnection("server=server;database=bo_produccion;integrated
security=sspi")



Dim strLogin As Object

cn.Open()

strLogin = cmd.ExecuteScalar

If strLogin Is Nothing Then

MsgBox("No es usuario")

Else

MsgBox("Usuario encontrado")

End If

Catch ex As Exception

MsgBox(ex.ToString)

Finally

cn.Close()

End Try

LO K PASA AHORA ES K ME DICE K "cn" NO ESTA DEFINIDO, COMO PUEDO CORREGIR
ESTO?

NUEVAMENTE MIL DISCULPAS POR LO DEL BITMAP



Sun, 22 May 2005 07:41:43 GMT  
 textbox vs db
hola, ok ya estoy corrigiendo el cdigo k me pasaron pero tengo algunas
dudas:
el cn.close me marca error por k?
Try ' Trap problems during the open

Dim cn = New
SqlClient.SqlConnection("server=demoserver;database=biblio;integratedsecurit
y=sspi")



Dim strLogin As Object

cn.Open()

strLogin = cmd.ExecuteScalar

If strLogin Is Nothing Then

MsgBox("No existe usuario")

Else

MsgBox("Usuario encontrado")

End If

Catch ex As Exception

MsgBox(ex.ToString)

Finally

cn.Close()

End Try



Mon, 23 May 2005 07:36:35 GMT  
 textbox vs db
Mi espanol no es muy bien e creo que esto es Portugese?

I see a problem with the Command.
Dim cmd As New SqlClient.SqlCommand("Select login FROM usuario WHERE login =

Quote:



You need to use SqlDbType.VarChar and give it a length.

As far as the Open, if your Windows logon does not have an account on the
SQL Server, it won't connect. Try
uid=SomeAccountOnTheServer;pwd=TheRightPassword instead.

hth

--
________________________________
William (Bill) Vaughn, Author, Trainer, Mentor
Microsoft Pacwest Regional Director, MVP
"ADO.NET and ADO Examples and Best Practices for VB Programmers--2nd
Edition" (ISBN: 1-893115-68-2)
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
________________________________

Quote:
> hola, ok ya estoy corrigiendo el cdigo k me pasaron pero tengo algunas
> dudas:
> el cn.close me marca error por k?
> Try ' Trap problems during the open

> Dim cn = New

SqlClient.SqlConnection("server=demoserver;database=biblio;integratedsecurit
Quote:
> y=sspi")

> Dim cmd As New SqlClient.SqlCommand("Select login FROM usuario WHERE login
=


> Dim strLogin As Object

> cn.Open()

> strLogin = cmd.ExecuteScalar

> If strLogin Is Nothing Then

> MsgBox("No existe usuario")

> Else

> MsgBox("Usuario encontrado")

> End If

> Catch ex As Exception

> MsgBox(ex.ToString)

> Finally

> cn.Close()

> End Try



Tue, 24 May 2005 01:46:40 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Textbox vs DB

2. Visual Basic App using Foxpro DB vs Access DB vs SQL Server DB

3. Visual Basic App using Foxpro DB vs Access DB vs SQL Server DB

4. ADO/OLE DB vs Native vs RDO - Oracle

5. Storing data - db vs ini vs registry?

6. Active Data db V.S. DataWarehouse db

7. Pixels vs. Inches for TextBox Top Property

8. Cast problem with string vs textbox

9. Textbox insert vs overwrite text

10. Masked Edit Vs Textbox

11. Textbox arrays, SendKeys vs Setfocus

 

 
Powered by phpBB® Forum Software