Click here to Skip to main content
15,879,613 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Hashing password, HOW ? [modified] Pin
Rob Smiley18-Apr-08 5:51
Rob Smiley18-Apr-08 5:51 
GeneralRe: Hashing password, HOW ? Pin
masoodp66618-Apr-08 8:02
masoodp66618-Apr-08 8:02 
GeneralRe: Hashing password, HOW ? Pin
Guffa18-Apr-08 12:06
Guffa18-Apr-08 12:06 
GeneralRe: Hashing password, HOW ? Pin
Rob Smiley18-Apr-08 23:33
Rob Smiley18-Apr-08 23:33 
QuestionString or binary data would be truncated. The statement has been terminated Pin
zaimah17-Apr-08 18:11
zaimah17-Apr-08 18:11 
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
Christian Graus17-Apr-08 19:46
protectorChristian Graus17-Apr-08 19:46 
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
darkelv17-Apr-08 19:48
darkelv17-Apr-08 19:48 
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
zaimah17-Apr-08 20:59
zaimah17-Apr-08 20:59 
this is my coding.

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click



Dim _kod As String
Dim Pemanggil As String
Dim Negeri As String
Dim run_no As String


Pemanggil = TextBox10.Text.Trim
Negeri = TextBox4.Text.Trim




If Kod.Text.Length > 0 And Nama.Text.Length > 0 And TextBox4.Text.Length > 0 And TextBox10.Text.Length > 0 And No_Tel.Text.Length > 0 And Masalah.Text.Length > 0 And Penyelesaian.Text.Length > 0 And TextBox9.Text.Length > 0 Then

Dim myConn As New SqlConnection(ConfigurationSettings.AppSettings("strConn"))

Dim MySQL As String = "INSERT INTO Senarai_Log(docNo,Tarikh,Kod_Koop,Nama_Koop,Nama_Koop1,Negeri,Nama,No_Tel,Masalah,Penyelesaian,Tindakan) Values (@docNo,@Tarikh,@Kod_Koop,@Nama_Koop,@Nama_Koop1,@Negeri,@Nama,@No_Tel,@Masalah,@Penyelesaian,@Tindakan)"
Dim cmd As SqlCommand = New SqlCommand(MySQL, myConn)

cmd.Parameters.Add(New SqlParameter("@Tarikh", SqlDbType.NVarChar, 250))
cmd.Parameters("@Tarikh").Value = System.DateTime.Now.Date

cmd.Parameters.Add(New SqlParameter("@Kod_Koop", SqlDbType.NVarChar, 250))
cmd.Parameters("@Kod_Koop").Value = Kod.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Nama_Koop", SqlDbType.NVarChar, 250))
cmd.Parameters("@Nama_Koop").Value = Nama.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Nama_Koop1", SqlDbType.NVarChar, 250))
cmd.Parameters("@Nama_Koop1").Value = Nama1.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Negeri", SqlDbType.NVarChar, 250))
cmd.Parameters("@Negeri").Value = Negeri

cmd.Parameters.Add(New SqlParameter("@No_Tel", SqlDbType.Char, 50))
cmd.Parameters("@No_Tel").Value = No_Tel.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Masalah", SqlDbType.Char, 250))
cmd.Parameters("@Masalah").Value = Masalah.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Penyelesaian", SqlDbType.NVarChar, 250))
cmd.Parameters("@Penyelesaian").Value = Penyelesaian.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Tindakan", SqlDbType.Char, 50))
cmd.Parameters("@Tindakan").Value = TextBox9.Text.Trim

cmd.Parameters.Add(New SqlParameter("@Nama", SqlDbType.Char, 50))
cmd.Parameters("@Nama").Value = Pemanggil

cmd.Parameters.Add(New SqlParameter("@docNo", SqlDbType.NVarChar, 50))
cmd.Parameters("@docNo").Value = System.DateTime.Now.ToString("yyyyMMdd") & Kod.Text & GetRunNo().ToString("D4")


cmd.Connection.Open()
cmd.ExecuteNonQuery()
cmd.Connection.Close()

Label3.Text = "MAKLUMAT TELAH DISIMPAN."
Label3.Visible = True



Else
Label3.Text = "SILA PENUHKAN MEDAN KOSONG."
Label3.Visible = True
End If




Clear()




End Sub


this button suppose to add all the data that i've key in, put in table "Senarai_Log". i have try this prgm 10 time and there's nothing wrong with it. but today when i try to add the data, the error msg about the web.config appear, when i change the customerrors mode, the error for string and binary msg appear.
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
Ashfield17-Apr-08 21:15
Ashfield17-Apr-08 21:15 
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
Christian Graus17-Apr-08 21:47
protectorChristian Graus17-Apr-08 21:47 
GeneralRe: String or binary data would be truncated. The statement has been terminated Pin
zaimah17-Apr-08 23:28
zaimah17-Apr-08 23:28 
GeneralVS 2005 VB.NET: Global Module failing to initializ Pin
kindman_nb17-Apr-08 8:04
kindman_nb17-Apr-08 8:04 
GeneralRe: VS 2005 VB.NET: Global Module failing to initializ Pin
Dave Kreskowiak17-Apr-08 8:18
mveDave Kreskowiak17-Apr-08 8:18 
GeneralRe: VS 2005 VB.NET: Global Module failing to initializ Pin
kindman_nb17-Apr-08 13:48
kindman_nb17-Apr-08 13:48 
GeneralRe: VS 2005 VB.NET: Global Module failing to initializ Pin
Dave Kreskowiak18-Apr-08 3:57
mveDave Kreskowiak18-Apr-08 3:57 
GeneralCompare values in DataRow field with its original value Pin
Steven J Jowett17-Apr-08 6:28
Steven J Jowett17-Apr-08 6:28 
GeneralRe: Compare values in DataRow field with its original value Pin
Dave Kreskowiak17-Apr-08 8:15
mveDave Kreskowiak17-Apr-08 8:15 
GeneralRe: Compare values in DataRow field with its original value Pin
Steven J Jowett17-Apr-08 11:19
Steven J Jowett17-Apr-08 11:19 
GeneralRe: Compare values in DataRow field with its original value Pin
Dave Kreskowiak18-Apr-08 1:32
mveDave Kreskowiak18-Apr-08 1:32 
GeneralOT: DeleteFile and MoveFile in VBS Pin
stephan_00717-Apr-08 5:22
stephan_00717-Apr-08 5:22 
GeneralRe: OT: DeleteFile and MoveFile in VBS Pin
Dave Kreskowiak17-Apr-08 6:51
mveDave Kreskowiak17-Apr-08 6:51 
GeneralRe: OT: DeleteFile and MoveFile in VBS Pin
stephan_00717-Apr-08 8:24
stephan_00717-Apr-08 8:24 
GeneralRe: OT: DeleteFile and MoveFile in VBS Pin
Dave Kreskowiak17-Apr-08 8:37
mveDave Kreskowiak17-Apr-08 8:37 
GeneralRe: OT: DeleteFile and MoveFile in VBS Pin
stephan_00717-Apr-08 8:42
stephan_00717-Apr-08 8:42 
GeneralRe: OT: DeleteFile and MoveFile in VBS Pin
Ashfield17-Apr-08 9:00
Ashfield17-Apr-08 9:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.