SQLBASE

lkjlkjlkj

New Member
I have a problem connecting to my sqlbase-database.<BR>I would like to know which providername I have to use in the connectionstringHave you tried....<BR><BR>"provider=SQLOLEDB.1";data source=myServer;initial catalog=mtDatabase; uid=myUsername;pwd=mtPassWord;"<BR><BR>Do you have the correct namespaces imported/used.<BR><BR>using System.Data;<BR>using System.Data.OleDb;<BR>or <BR>using System.Data.SqlTypes;<BR>using System.Data.SqlClient;<BR><BR><% @page LANGUAGE="c#" TRACE="false" %><BR><% @import Namespace="System" %><BR><% @import Namespace="System.Data" %><BR><% @import Namespace="System.Data.OleDb " %><BR><% @import Namespace="System.Web.Services " %><BR><% <BR>string strDSN="Provider=SQLOLEDB.1 ;Data Source=DEV02; initial catalog=pubs;uid=sa;pwd=;";<BR>string strSQL="SELECT * from authors";<BR><BR>OleDbConnection cnConn=new OleDbConnection(strDSN);<BR><BR>cnConn.Open();<BR>OleDbCommand cmCom = new OleDbCommand (strSQL,cnConn);<BR>OleDbDataReader myReader;<BR>myReader=cmCom.ExecuteReader();<BR>while (myReader.Read()) <BR>{<BR> string arr="LastName - ";<BR> arr=arr+myReader["au_lname"];<BR> Response.Write(arr+ "<BR>");<BR>}<BR>%><BR>Error = "SQL Server does not exist or access denied"<BR><BR>SQLOLEDB.1 is the provider for SQLSERVER-databases<BR>I need to connect to a SQLBASE-databaseSorry, I should have read your question more carefully.<BR><BR>Have you tried MSDASQL.1 ?<BR><BR>Hope this helpsException Details: System.NotSupportedException: The .Net Data OLE DB Provider(System.Data.OleDb) does not support the MSDASQL Provider, Microsoft OLE DB Provider for ODBC Drivers.Sorry,I'm at a loss here.<BR><BR>Good luck<BR>Tony
 
Back
Top