ingresar datos a una aplicacion para pocket pc
Publicado por ingresar datos a una aplicacic (8 intervenciones) el 05/12/2006 06:41:11
hola toy en apriento
resulta k hago una aplicacion para k impacte tablas en sql mobile y bueno se me cae al ejecutarse en diferentes partes
habace se cae en la linea 3 otras en la 2 nose k pueda ser
si algien se maneja en este tema de las pocket k me pueda dar una manito con algun ejemplo de insercion de datos a sql2005 se lo agradeceria eternamente jajja
adjunto el codigo q utlizo por si alguien ve alguna pifia
Saludos y gracias
Imports System
Imports System.Xml
Imports System.Data
Imports System.Data.SqlServerCe
Imports System.Data.SqlServerCe.SqlCeConnection
Imports System.Data.SqlServerCe.SqlCeException
Imports System.Data.Common
Imports System.Windows.Forms
Imports System.InvalidOperationException
Imports System.IO
Imports System.Reflection
Public Class Form1
Inherits System.Windows.Forms.Form
Friend WithEvents butIngrar As System.Windows.Forms.Button
Friend WithEvents txtApellido As System.Windows.Forms.TextBox
Friend WithEvents txtNombre As System.Windows.Forms.TextBox
Friend WithEvents butCREAR As System.Windows.Forms.Button
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Private Sub butIngrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butIngrar.Click
dim connStr As String = "Data Source = giles.sdf; Password =tt;"
dim objConn As New SqlCeConnection
Dim q As String
q = "insert into foxes (nombre,apellido)values('" & txtNombre.Text & "','" & txtApellido.Text & "')"
objConn.ConnectionString = connStr
objConn.Open()
Dim objCmd As SqlCeCommand = New SqlCeCommand(q, objConn)
objCmd.CommandType = CommandType.Text
objCmd.ExecuteNonQuery()
objCmd.Dispose()
End Sub
End Class
resulta k hago una aplicacion para k impacte tablas en sql mobile y bueno se me cae al ejecutarse en diferentes partes
habace se cae en la linea 3 otras en la 2 nose k pueda ser
si algien se maneja en este tema de las pocket k me pueda dar una manito con algun ejemplo de insercion de datos a sql2005 se lo agradeceria eternamente jajja
adjunto el codigo q utlizo por si alguien ve alguna pifia
Saludos y gracias
Imports System
Imports System.Xml
Imports System.Data
Imports System.Data.SqlServerCe
Imports System.Data.SqlServerCe.SqlCeConnection
Imports System.Data.SqlServerCe.SqlCeException
Imports System.Data.Common
Imports System.Windows.Forms
Imports System.InvalidOperationException
Imports System.IO
Imports System.Reflection
Public Class Form1
Inherits System.Windows.Forms.Form
Friend WithEvents butIngrar As System.Windows.Forms.Button
Friend WithEvents txtApellido As System.Windows.Forms.TextBox
Friend WithEvents txtNombre As System.Windows.Forms.TextBox
Friend WithEvents butCREAR As System.Windows.Forms.Button
Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
Private Sub butIngrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles butIngrar.Click
dim connStr As String = "Data Source = giles.sdf; Password =tt;"
dim objConn As New SqlCeConnection
Dim q As String
q = "insert into foxes (nombre,apellido)values('" & txtNombre.Text & "','" & txtApellido.Text & "')"
objConn.ConnectionString = connStr
objConn.Open()
Dim objCmd As SqlCeCommand = New SqlCeCommand(q, objConn)
objCmd.CommandType = CommandType.Text
objCmd.ExecuteNonQuery()
objCmd.Dispose()
End Sub
End Class
Valora esta pregunta


0