Discussione sull’articolo "Come accedere al database MySQL da MQL5 (MQL4)" - pagina 10
Ti stai perdendo delle opportunità di trading:
- App di trading gratuite
- Oltre 8.000 segnali per il copy trading
- Notizie economiche per esplorare i mercati finanziari
Registrazione
Accedi
Accetti la politica del sito e le condizioni d’uso
Se non hai un account, registrati
Salve, sembra che MySQL neghi la connessione all'utente ODBC su localhost.
Puoi provare a controllare su StackOverflow: http://stackoverflow.com/questions/23950722/how-to-overcome-error-1045-28000-access-denied-for-user- odbclocalhost-u ;
Ciao Eugeniy Lugovoy.
Ho usato MQLMySQL per implementare la query comune, inserire, aggiornare, cancellare le operazioni, ma c'è un problema, non può inserire cinese, query fuori del cinese è anche confuso, vorrei chiedere, si processo di confezionamento middleware hanno impostato la codifica? Vorrei chiedere, il processo di packaging del middleware ha impostato il codice? Il fenomeno è il seguente:
GETTARE TABELLA SE ESISTE `tb_test_pat`;
CREARE TABELLA `tb_test_pat` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `symbol` varchitecture
`symbol` varchar(255) NOT NULL, `start_time` datetime, `tb_test_pat`; CREARE TABLE
`start_time` datetime NOT NULL,
`ora_fine` datetime NOT NULL, `trend` int(255)
`trend` int(10) NOT NULL, `punti` int(10)
`punti` int(10) unsigned zerofill NOT NULL, `commenti` text CHARacteristic
`commenti` testo CHARACTER SET utf8,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Errore nell'inserimento del cinese
Errore: la query era vuota query: INSERT INTO tb_test_pat (trend, symbol, start_time, end_time, points, comments) VALUES (1, 'EURUSD ','2014.12.16 13:00 ','2014.12.17 20:00',8,'Test 12')
Inserimento inglese riuscito
Succeeded: INSERT INTO tb_test_pat (trend, symbol, start_time, end_time, points, comments) VALUES (1,'EURUSD','2014.12.16 13:00','2014.12.17 20 :00',8,'abc')
A cosa serve?
Ciao Eugeniy Lugovoy.
Ho usato MQLMySQL per implementare la query comune, inserire, aggiornare, cancellare le operazioni, ma c'è un problema, non può inserire cinese, query fuori del cinese è anche confuso, vorrei chiedere, si processo di confezionamento middleware hanno impostato la codifica? Vorrei chiedere, il processo di packaging del middleware ha impostato il codice? Il fenomeno è il seguente:
GETTARE TABELLA SE ESISTE `tb_test_pat`;
CREARE TABELLA `tb_test_pat` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `symbol` varchitecture
`symbol` varchar(255) NOT NULL, `start_time` datetime, `tb_test_pat`; CREARE TABLE
`start_time` datetime NOT NULL,
`ora_fine` datetime NOT NULL, `trend` int(255)
`trend` int(10) NOT NULL, `punti` int(10)
`punti` int(10) unsigned zerofill NOT NULL, `commenti` text CHARacteristic
`commenti` testo CHARACTER SET utf8,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Errore nell'inserimento del cinese
Errore: la query era vuota query: INSERT INTO tb_test_pat (trend, symbol, start_time, end_time, points, comments) VALUES (1,'EURUSD','2014.12.16 13:00 ','2014.12.17 20:00',8,'Test 12')
Inserimento inglese riuscito
Succeeded: INSERT INTO tb_test_pat (trend, symbol, start_time, end_time, points, comments) VALUES (1,'EURUSD','2014.12.16 13:00','2014.12.17 20 :00',8,'abc')
A cosa serve?
Si può provare a eseguire il comando successivo dopo la connessione a MySQL.
SET character_set_results = 'utf8', character_set_client = 'utf8', character_set_connection = 'utf8', character_set_database = 'utf8', set_caratteri_server = 'utf8'
È possibile che alcune di queste impostazioni non siano impostate su UTF.
Un'altra soluzione è quella di eseguire i comandi successivi uno alla volta dopo la connessione.
SET NOMI 'utf8'
IMPOSTAZIONE CARATTERE 'utf8'
SET SESSIONE collation_connection = 'utf8_general_ci'
Un'altra soluzione è quella di eseguire i comandi successivi uno alla volta dopo la connessione.
SET NOMI 'utf8'
IMPOSTAZIONE CARATTERE 'utf8'
SET SESSIONE collation_connection = 'utf8_general_ci'
Non funziona ancora, ma ho trovato il problema
bool __stdcall MySqlExecute( int pConnection, wchar_t* pQuery)
{
...
char Query[16384];
sprintf_s(Query, wcslen(pQuery)+10, "%S", pQuery); // Quando si esegue questa riga, viene riscontrato il cinese e Query diventa una stringa vuota con conseguente messaggio di errore: Errore: Query era vuota query: UPDATE tb_test_pat SET commenti_test_pat SET commenti_test_pat SET commenti_test_pat SET commenti_test_pat SET commenti_test_pat SET commenti_test_pat SET commenti_test_pat test_pat SET commenti='cinese'
Potete aiutarmi a risolvere questo problema? Grazie mille! Sono a 64 bit
Non funziona ancora, ma ho trovato il problema
bool __stdcall MySqlExecute( int pConnection, wchar_t* pQuery)
{
...
char Query[16384];
sprintf_s(Query, wcslen(pQuery)+10, "%S", pQuery); // Durante l'esecuzione di questa riga, è stato riscontrato il cinese e Query è diventata una stringa vuota, con conseguente messaggio di errore: Error: Query was empty query: UPDATE tb_test_pat SET comments='Chinese'. test_pat SET commenti='cinese'
Potete aiutarmi a risolvere questo problema? Grazie mille! Sono a 64 bit
Anche UTF-8 non può essere usato in questo caso, ma solo UTF-16!