By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,215 Members | 1,930 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,215 IT Pros & Developers. It's quick & easy.

Argument not specified for parameter 'index' of 'public readonly default property cha

Prathap
P: 37
Argument not specified for parameter 'index' of 'public readonly default property chars(index as integer)as char'.

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

con.ConnectionString = Str() [I[B]]<-the message has shown here)
[/i][/b] adp = New SqlClient.SqlDataAdapter("insert into ShiftLogin values ('" + TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox2.Text + "','" + TextBox2.Text + "','" + TextBox2.Text + "') ", con)
adp.Fill(ds)
MsgBox("Inserted")
End Sub
Nov 29 '11 #1
Share this Question
Share on Google+
3 Replies


pod
100+
P: 298
pod
I think it would be best to be checking for Nulls and maybe using the Command.Parameters
Nov 29 '11 #2

Rabbit
Expert Mod 10K+
P: 12,410
The STR() function returns the string equivalent of a number and expects one parameter, the number to convert. STR(100) returns "100". I have no idea why you are using it for your connection string, it's completely wrong.
Nov 29 '11 #3

Prathap
P: 37
Its working.. i had removed '()' from con.ConnectionString = Str()
Nov 30 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.