Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQLInstallerError not returning helpful info

Status
Not open for further replies.

influent1

Programmer
Sep 20, 2004
10
US
I'm trying to create an ODBC data source programmatically, and it's not working. I'm using the SQLInstallerError API call, and it's returning zero every time, and not placing any error information in the Stringbuilder string I'm passing it. Has anybody else had this problem?


Dim nErrorCode As Integer
Dim strError As New System.Text.StringBuilder(255)
Dim nErrorLen As Integer
returnCode = SQLConfigDataSource(0&, ODBC_ADD_SYS_DSN, "SQL Server", attributes.ToString)
If returnCode = 0 Then
nErrorCode = SQLInstallerError(1, nErrorCode, strError.ToString, 255, nErrorLen)
End If
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top