vb.net - Connecting to SOTAMAS90 ODBC? -
How can I connect to a Mas90 file using my ODBC - SOTAMAS90? How can I do this in vb.net?
I - I have not tried to ensure myself 100% if it works or not Neither do I claim myself as a vb.net programmer, but it is something to try at least ...
Importing System.Data Import Microsoft.Data .Odbc 'database connection public dbConn as OdbcConnection = nothing public dbCmnd as OdbcCommand public dbReader as OdbcDataReader public dbConnStr as string connect as public dbError exception OD To make MAS90 using BC; As dbError stores' exception if a sub connectToDatabase (ByVal company String, ByVal uid String, ByVal pwd as as string) in as dim dsn String = "SOTAMAS90" Dim timeout string = "360" "in terms of building string dbConnStr =" DSN = "+ dsn + _"; Directory = M: \ MAS90 "+ _"; prefix = M: \ MAS90 \ SOA \ "+ _"; ViewDLL = M: \ MAS90 \ Home \ "+ _" server = NotTheServer '+ _ "company =" + company + _ "; UID =" + uid + "; PWD =" + PWD + ";" connect not already so Feb (DbConn nothing) then try dbConn = new OdbcConnection (dbConnStr) dbConn.ConnectionTimeout = timeout dbConn.Open () dbError = Nothing Catch ex As Exception dbError = pre dbConn = some other end not end even Try End Sub
Comments
Post a Comment