MySql does not work on vs code. Cannot read properties of undefined (reading 'undefined')

kd3sttzy  于 2022-12-22  发布在  Mysql
关注(0)|答案(1)|浏览(346)

database
All the code is correct and can be run in MySQL workbench, but not in vscode.

SELECT * FROM order_item_notes;

-- SELECT * FROM  customers 
-- -- Where customer_id=1 
-- ORDER BY first_name;

-- SELECT first_name,
-- last_name,points,
-- ( points + 10 )*100 AS discount_factor
-- FROM customers;

-- SELECT DISTINCT state FROM customers;

I have tried using use database;,but it doesn't work

hk8txs48

hk8txs481#

You need to CREATE the ODBC DSN NAME to connect to the database then you can use this method to call it

Set Conn = Server.CreateObject("ADODB.Connection")                                          
                    Conn.Open "DSN=ODBCDNS"                                                                  
                    SET RS=Server.CreateObject("ADODB.recordset")                                               
                    rs.Open "SELECT * FROM order_item_notes", Conn

Also that tool seems okay .. but stop everything and download MS Workbench .. it will make your life easier. Granted this is ASP Classic code but I believe it might work in VB as well, or at least get you onto the right track.

相关问题