עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[VB2010] יצירת קשר עם שרת MySQL

Featured Replies

פורסם

אהלן. אני מנסה כבר זמן ממושך להתחבר למסד הנתונים MySQL שבשרת האכסון שברשותי.

להלן הקוד:

    Public Sub ReadMyData(ByVal connectionString As String)        
Dim queryString As String = "SELECT OrderID, CustomerID FROM Orders"
Using connection As New OleDbConnection(connectionString)
Dim command As New OleDbCommand(queryString, connection)


connection.Open()


Dim reader As OleDbDataReader = command.ExecuteReader()
While reader.Read()
Console.WriteLine(reader.GetInt32(0).ToString() + ", " _
+ reader.GetString(1))
End While


' always call Close when done reading.
reader.Close()
End Using
End Sub


Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click ReadMyData("provider=SQLOLEDB;Server=xxx.xxx.xx.xx;Database=dbname;Uid=user_test;Pwd=pass;")
End Sub

אבל התוכנה מחזירה לי שגיאה:

[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

בהתחלה חשבתי שאולי הטעות אצלי, אבל ניסיתי את כל ה-connection strings האפשריים. אני מתחיל לחשוב שפשוט אין לי הרשאות להתחבר מתוכנה צד שלישי? כלומר, רק לphpmyadmin ולשרת עצמו (שמריץ קוד php) יש אפשרות להתחבר למסד נתונים?

נערך על-ידי Zeev86

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.