It is excel VBA issue.
If I use Sybase connection string (another database from same screenshot of ODBC Data Source), and the code works fine.
But if I use the code for SQL Server, it returns error, see attached screenshot. I am sure that Server name and Database name are correct. Connection string looks correct too ( https://www.connectionstrings.com/mi...or-sql-server/ ). Did I use the correct connection string (standard security)? What could cause such error?
I am not an IT professional, so not sure why it has error. Is it because of database setting? Is it because it does not allow User/Password access? How does SQL server setting work? Or some kind of Excel reference?
I can manually use excel to connect the database and copy data to excel, see screenshot. So I do have the access to database.
Thanks.
Additional note: is it related to Microsoft Office? My workplace microsoft office may be 32 bits (not sure), while the database is 64 bits? Not an IT, don't know much about it. The reason I say this: when I use Access > External Data > ODBC Database to connect to the database, it shows 32 bit for the database. But when I am ODBC Data Source, it shows 64 bits, since it is 64 bit laptop.
Bookmarks