Click here to Skip to main content
15,911,786 members
Home / Discussions / Database
   

Database

 
Questionquery Pin
reza assar23-Jul-10 21:32
reza assar23-Jul-10 21:32 
AnswerRe: query Pin
Goutam Patra23-Jul-10 22:57
professionalGoutam Patra23-Jul-10 22:57 
AnswerRe: query Pin
Mycroft Holmes23-Jul-10 23:05
professionalMycroft Holmes23-Jul-10 23:05 
QuestionMessage Removed Pin
23-Jul-10 21:06
prachidalwadi23-Jul-10 21:06 
AnswerRe: How to optimize the query with more than one left outer join Pin
CitrusTech23-Jul-10 21:14
CitrusTech23-Jul-10 21:14 
Questionsql problem Pin
bapu288923-Jul-10 20:40
bapu288923-Jul-10 20:40 
AnswerRe: sql problem Pin
Goutam Patra23-Jul-10 21:31
professionalGoutam Patra23-Jul-10 21:31 
QuestionRe: sql problem Pin
bapu288923-Jul-10 23:33
bapu288923-Jul-10 23:33 
hello
thanks for your rep.

ok but is this going to loop in sql quary?

for adding multiple names this is what i have done
Private Sub GetNewName()
    AddName.Add(TextBox1.Text)
    AddName.ToArray()
End Sub



so with this i can add one name or 100 names and i have debug this code and it's looks fine but only thing is how can i insert all this name from array to database

so in that case i have to loop while i am inserting

so this is i have done for insert
Comm = New SqlClient.SqlCommand("InsertNew", LetsGo.AndGetConnection)
      Comm.CommandType = CommandType.StoredProcedure
      Comm.CommandText = "InsertNew"

      Comm.Parameters.Add("@Village", SqlDbType.NVarChar).Value = ComboBox1.SelectedItem.ToString
      Comm.Parameters.Add("@District", SqlDbType.NVarChar).Value = ComboBox2.SelectedItem.ToString


      For I As Integer = 0 To AddName.Count
          Comm.Parameters.Add("@FirstName", SqlDbType.NVarChar).Value = AddName(I)
      Next



      Comm.ExecuteNonQuery()
      Conn.Close()
      MsgBox("Item Saved")


and it looping through all the name i have entered but at last it shows error

error "Index was out of range. must be non-negative and less then the size of the collection parameter name index"

waiting for your kind help
AnswerRe: sql problem Pin
Goutam Patra23-Jul-10 23:56
professionalGoutam Patra23-Jul-10 23:56 
QuestionReverse of * Pin
Ray Cassick23-Jul-10 7:18
Ray Cassick23-Jul-10 7:18 
AnswerRe: Reverse of * Pin
Yusuf23-Jul-10 8:54
Yusuf23-Jul-10 8:54 
GeneralRe: Reverse of * Pin
Ray Cassick23-Jul-10 10:08
Ray Cassick23-Jul-10 10:08 
GeneralRe: Reverse of * Pin
Mycroft Holmes23-Jul-10 13:37
professionalMycroft Holmes23-Jul-10 13:37 
GeneralRe: Reverse of * Pin
Ray Cassick23-Jul-10 13:57
Ray Cassick23-Jul-10 13:57 
AnswerRe: Reverse of * Pin
Eddy Vluggen23-Jul-10 9:17
professionalEddy Vluggen23-Jul-10 9:17 
GeneralRe: Reverse of * Pin
Ray Cassick23-Jul-10 10:11
Ray Cassick23-Jul-10 10:11 
AnswerRe: Reverse of * Pin
Mycroft Holmes23-Jul-10 13:41
professionalMycroft Holmes23-Jul-10 13:41 
QuestionCannot test the registered server in SQL Server 2008, neither start, pause or stop Pin
Kujtim Hyseni23-Jul-10 6:01
Kujtim Hyseni23-Jul-10 6:01 
Questionproblem getting data in a group Pin
Dhyanga23-Jul-10 2:54
Dhyanga23-Jul-10 2:54 
AnswerRe: problem getting data in a group Pin
Corporal Agarn23-Jul-10 5:47
professionalCorporal Agarn23-Jul-10 5:47 
AnswerRe: problem getting data in a group Pin
Mycroft Holmes23-Jul-10 13:45
professionalMycroft Holmes23-Jul-10 13:45 
AnswerRe: problem getting data in a group Pin
CitrusTech23-Jul-10 21:11
CitrusTech23-Jul-10 21:11 
QuestionTable Optimization Problem - SQL Server Pin
Jacobus0123-Jul-10 2:36
Jacobus0123-Jul-10 2:36 
AnswerRe: Table Optimization Problem - SQL Server Pin
Eddy Vluggen23-Jul-10 5:06
professionalEddy Vluggen23-Jul-10 5:06 
AnswerRe: Table Optimization Problem - SQL Server Pin
Mycroft Holmes23-Jul-10 14:00
professionalMycroft Holmes23-Jul-10 14: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.