on 10-07-2008 2:05 PM
I tried to connect to my CE1-maxdb. My user/password is superdba:a4711sap
With this pwd i can connect via sqlcli, but i am not able to connect via ODBC and dotnet:
ERROR [HY000] [SAP AG][SDBODBC DLL][MaxDB] General error;-4008 POS(1)
'Unknown user name/password combination ERROR [HY000] [SAP AG]
'[SDBODBC DLL][MaxDB] General error;-4008 POS(1) Unknown user name/password combination"
can someone help me?
My dotnet-Code:
Imports System
Imports System.Data
Imports System.Data.Odbc
Imports System.Windows.Forms
Partial Public Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim sz As String = ""
Dim dtRecords As DataTable = GetDataTable("SELECT * FROM DOMAIN.TABLES")
Dim alTables As New ArrayList
For Each dr As DataRow In dtRecords.Rows
Dim sTable As String = dr.Item("ATTRIBUTE_NAME")
alTables.Add(sTable)
Next
Stop
End Sub
Public Shared Function GetDataTable(ByVal sql As String) As DataTable
Dim con As New OdbcConnection("driver=sap db;servernode=danixp;serverdb=CE1;uid=superdba;pwd=a4711sap")
Try
con.Open()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Dim rt As New DataTable()
Dim ds As New DataSet()
Dim da As New OdbcDataAdapter()
Dim cmd As New OdbcCommand(sql, con)
da.SelectCommand = cmd
da.Fill(ds)
Try
rt = ds.Tables(0)
Catch
rt = Nothing
End Try
Return rt
End Function
End Class
OK, found solution:
the PWD is converted to Uppercase!
Dim con As New OdbcConnection("driver=sap db;servernode=danixp;serverdb=CE1;uid=SUPERDBA;pwd=A4711SAP")
Try
con.Open()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.