Click here to Skip to main content
15,890,557 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Error using session variable in vbscript with code behind file Pin
dptalt14-May-09 4:36
dptalt14-May-09 4:36 
AnswerRe: Error using session variable in vbscript with code behind file Pin
AlexeiXX314-May-09 8:33
AlexeiXX314-May-09 8:33 
GeneralRe: Error using session variable in vbscript with code behind file Pin
dptalt14-May-09 9:20
dptalt14-May-09 9:20 
GeneralRe: Error using session variable in vbscript with code behind file Pin
dptalt14-May-09 10:03
dptalt14-May-09 10:03 
GeneralRe: Error using session variable in vbscript with code behind file Pin
AlexeiXX314-May-09 10:11
AlexeiXX314-May-09 10:11 
Questionrepeater control Pin
kanadoss14-May-09 2:48
kanadoss14-May-09 2:48 
AnswerRe: repeater control Pin
Christian Graus14-May-09 2:50
protectorChristian Graus14-May-09 2:50 
Questiononly first row from datareader gets affected Pin
svknair14-May-09 1:38
svknair14-May-09 1:38 
sqlstr = "select country , city FROM tbl_data WHERE RID in( " & ID & ") "

dr = ''''''''''''''''''''exexuting the reader


Ifdr.HasRows Then
Whiledr.Read
Dim datacountry =dr("country").ToString.Trim
Dim datacity =dr("city").ToString.Trim


MsgBox(datacountry & "===" & datacity)


sqlstr = "SELECT user FROM tbl_info " _
& " WHERE country='" & drpcountry.SelectedItem.Text & "' AND city='" & drp city.SelectedItem.Text & "'"
dr = ''''''''''''''''''''exexuting the reader
Ifdr.HasRows Then
Whiledr.Read

sqlstr = "IF EXISTS (SELECT user, country, city FROM tbl_info " _
& " WHERE user='" &dr("user").ToString.Trim & "'" _
& " AND country='" & datacountry & "' AND city='" & datacity & "')" _
& " UPDATE tbl_info set user='" &dr("user").ToString.Trim & "' " _
& " WHERE user='" &dr("user").ToString.Trim & "' AND country='" & datacountry & "' AND city='" & datacity & "' " _
& " Else " _
& " INSERT INTO tbl_info(user,country, city) " _
& " VALUES ('" &dr("user").ToString.Trim & "','" & datacountry & "','" & datacity & "')"

''''''''''exexuting the query........
End While
End If

End While
End If




but in this only the first record from the country and city gets affected.

all the records obtained in the reader shld get affected
how do i rectify it
AnswerRe: only first row from datareader gets affected Pin
Christian Graus14-May-09 2:51
protectorChristian Graus14-May-09 2:51 
AnswerRe: only first row from datareader gets affected Pin
Ramesh Swaminathan14-May-09 2:52
Ramesh Swaminathan14-May-09 2:52 
GeneralRe: only first row from datareader gets affected Pin
Christian Graus14-May-09 3:01
protectorChristian Graus14-May-09 3:01 
GeneralBasic Photography Web Site (PLZ H3LP IRGint!!!) Pin
Brady Kelly14-May-09 0:59
Brady Kelly14-May-09 0:59 
GeneralRe: Basic Photography Web Site (PLZ H3LP IRGint!!!) Pin
Christian Graus14-May-09 1:09
protectorChristian Graus14-May-09 1:09 
GeneralCheckout XARA Pin
David Mujica14-May-09 3:31
David Mujica14-May-09 3:31 
Questiontable inside a href=".." Question? Pin
mrcooll14-May-09 0:59
mrcooll14-May-09 0:59 
AnswerRe: table inside a href=".." Question? Pin
jbracken197314-May-09 2:05
jbracken197314-May-09 2:05 
AnswerRe: table inside a href=".." Question? Pin
Samer Aburabie14-May-09 2:10
Samer Aburabie14-May-09 2:10 
QuestionProblem while binding data to a DropDownList in GridView's EditItemTemplate column Pin
YazhiniP14-May-09 0:32
YazhiniP14-May-09 0:32 
AnswerRe: Problem while binding data to a DropDownList in GridView's EditItemTemplate column Pin
Samer Aburabie14-May-09 2:23
Samer Aburabie14-May-09 2:23 
GeneralRe: Problem while binding data to a DropDownList in GridView's EditItemTemplate column Pin
YazhiniP15-May-09 0:02
YazhiniP15-May-09 0:02 
Questioncoding for scanner in aspx page Pin
rummer14-May-09 0:02
rummer14-May-09 0:02 
AnswerRe: coding for scanner in aspx page Pin
Paddy Boyd14-May-09 0:09
Paddy Boyd14-May-09 0:09 
GeneralRe: coding for scanner in aspx page Pin
rummer14-May-09 0:18
rummer14-May-09 0:18 
GeneralRe: coding for scanner in aspx page Pin
Paddy Boyd14-May-09 0:26
Paddy Boyd14-May-09 0:26 
GeneralRe: coding for scanner in aspx page Pin
rummer14-May-09 0:32
rummer14-May-09 0:32 

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.