Hi i wonder if anyone can assist me.
we previously had a web page that was published . but now due to increase the database name was changed.
i have changed the name in the datasource in code behind but it still looks at the old database.
is there any other place where it must be changed as well? i have removed the code and redid it but it still looks at old database name.
the database name was changed from Credit_reject to REJECTS
the error is login failed for database Credit_reject
Dim connections As String = "Data Source=INTRA1\INTRA;Initial Catalog=REJECTS;User ID=sa;Password=*******;Pooling=False"
Dim mycon As New SqlConnection(connections)
mycon.Open()
Dim insrtcom As New SqlCommand
insrtcom.CommandText = ("insert into CREDIT_REJECTS(Acc_Num, ACC_NAME,ORDERNUM,RCV_NO,TRAY_NO,SLIPNO,DATE,REASON,OTHER_REASON,OPERATOR) values (@Acc_Num,@ACC_NAME,@ORDERNUM,@RCV_NO,@TRAY_NO,@SLIPNO,@DATE,@REASON,@OTHER_REASON,@OPERATOR)")
insrtcom.Parameters.AddWithValue("@Acc_Num", DropDownList1.SelectedItem.Text)
insrtcom.Parameters.AddWithValue("@ACC_NAME", DropDownList1.SelectedValue)
insrtcom.Parameters.AddWithValue("@ORDERNUM", TextBox6.Text)
insrtcom.Parameters.AddWithValue("@RCV_NO", TextBox2.Text)
insrtcom.Parameters.AddWithValue("@TRAY_NO", TextBox3.Text)
insrtcom.Parameters.AddWithValue("@SLIPNO", TextBox5.Text)
insrtcom.Parameters.AddWithValue("@DATE", lbldate.Text)
insrtcom.Parameters.AddWithValue("@REASON", DropDownList2.SelectedItem.Text)
insrtcom.Parameters.AddWithValue("@OTHER_REASON", TextBox4.Text)
insrtcom.Parameters.AddWithValue("@OPERATOR", DropDownList3.SelectedValue)
insrtcom.Connection = mycon
insrtcom.ExecuteNonQuery()
mycon.Close()
mycon.Dispose()
lblinserted.Text = " 1 Row Inserted"