Get Data from closed Excel Workbook Column1, Column2 and Column3 wit ADODB Conection
I use ADODB in Excel VBA to retrieve data from a closed workbook. I can select all columns, select individual columns by column header. This works perfectly.
How do I preserve é (e-acute) character from SQL DB to ADODB recordset to Excel through VBA?
I have an Excel VBA project that iterates through a list in a parameter table and populates data using the rows of the parameter table to provide arguments for the parameters of the SQL Query to a SQL Server DB. This is to produce n versions of an excel document from n rows in the parameter table in the master macro-enabled workbook. Unfortunately, I’ve run aground on the dumbest snag I could possibly imagine. Some of the data requested in the SQL DB includes the é (e-acute) character but when it runs through the ADODB recordset object, it comes out the other side as a □ (WHITE SQUARE, U+25A1). This fouls things up because I A) need the correct character shown in the published documents and B) my code is matching the stings returned by the SQL query to values in the spreadsheet and it is failing on these messed up characters.
Excel/Vba/ADODB: how to connet to Table only with its name, to perform a query?
I have tried to get a solution to my problem, looking also to the past questions here reported, but I didn’t find a solution.