PDA

View Full Version : تو رو خدا آقایان کمک کنید



Asad.Safari
یک شنبه 31 خرداد 1383, 10:07 صبح
من تو دیتابیس dbo هارو به یوزر نیمم در آوردم
تو صفحم سرورو از local به سرور ماتریکس تغییر دادم
باز دوباره کار نمیکنه
تگ اتصال به بانک هم اینه:
<script runat="server" language="vb">
sub login(sender as object,e as eventargs)
dim strconnection as string="server=(my matrix server);database=H_myusername;integrated security=true;"
dim objconnection as new sqlconnection(strconnection)
dim strsql as string="select password from Register where email = '" & txtemail.text & "'"
dim objcommand as new sqlcommand(strsql,objconnection)
objconnection.open()
dim dr as sqldatareader=objcommand.executereader()
if dr.read()
if dr("password").tostring=txtpassword.text
response.Cookies("CustomerID").value=txtemail.text
response.Redirect("def.aspx")
else
response.Write("password not found")
end if
end if
dr.close()
end sub

تو رو خدا بگیییین چه کنم؟

komeil64
یک شنبه 31 خرداد 1383, 11:14 صبح
سلام
شما توی کانکشنتون پسورد و یوزر دیتا بیس را مشخص نکردین.
احتملا مشکل از همینه

Asad.Safari
یک شنبه 31 خرداد 1383, 11:48 صبح
AZIZ CHETOR ONI KE TO GHOFTE ANJAM BEDAM?
MAMNON

komeil64
سه شنبه 02 تیر 1383, 19:10 عصر
سلام
به کانکشنتون اینا رو اضافه کنید
uid=database username;pwd=database pass

Asad.Safari
سه شنبه 02 تیر 1383, 20:53 عصر
سلام عزیز!!!
من این رو به این طور وارد کردم:


dim strconnection as string="server=(db2.europe.webmatrixhosting.net,1441);data base=H_asad20;uid=asad20;pwd=***;integrated security=true;"
dim objconnection as new sqlconnection(strconnection)


خطا داد


SQL Server does not exist or access denied.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: SQL Server does not exist or access denied.

Source Error:


Line 48: dim strsql as string="select password from Register where email = '" & txtemail.text & "'"
Line 49: dim objcommand as new sqlcommand(strsql,objconnection)
Line 50: objconnection.open()
Line 51: dim dr as sqldatareader=objcommand.executereader()
Line 52: if dr.read()