PDA

View Full Version : آیا این connection درست است؟



Asad.Safari
سه شنبه 09 تیر 1383, 13:42 عصر
Dim strConn As String = "Provider=SQLOLEDB;Data Source=server=db2.europe.webmatrixhosting.net,1441 ;Initial Catalog=h_asad20;uid=asad20;password=*;Trusted_Con nection=Yes;"
Dim cn As New OleDb.OleDbConnection(strConn)


error:


[DBNETLIB][ConnectionOpen (Connect()).]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.OleDb.OleDbException: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Source Error:


Line 159:
Line 160: If cboCategories.Items.Count = 0 Then
Line 161: cn.Open()
Line 162: FetchCategories()
Line 163: cboCategories.Items(0).Selected = True

Mahdavi
سه شنبه 09 تیر 1383, 13:54 عصر
Dim strConn As String = "Provider=SQLOLEDB;Data Source=server=db2.europe.webmatrixhosting.net,1441 ;Initial Catalog=h_asad20;uid=asad20;password=bamaram;Trust ed_Connection=Yes;"

دوست عزیز
Data Source =server= .... :shock: یعنی چی !!!
احتمالا کلمه server= اضافه است .

Asad.Safari
سه شنبه 09 تیر 1383, 21:56 عصر
اونی که شما گفتید درست کردم
یه error دیگه داد:


Login failed for user 'EU2005\asad20'.
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.OleDb.OleDbException: Login failed for user 'EU2005\asad20'.

Source Error:


Line 159:
Line 160: If cboCategories.Items.Count = 0 Then
Line 161: cn.Open()
Line 162: FetchCategories()
Line 163: cboCategories.Items(0).Selected = True