Problem Solved. Thx! Mateus Begossi
----- Original Message ----- From: Mateus Begossi <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; MySQL List <[EMAIL PROTECTED]> Sent: Wednesday, June 05, 2002 10:27 PM Subject: SQLPrepare problems > Hello everyone, > Iīm writing a VC++ 6.0 App that among many other things manages a simple > mySQL database, using myODBC v3.51. Righ now Iīm trying to send a "test" > simple statement to the database, using SQLPrepare: > retcode = SQLPrepare(hstmt,"INSERT INTO ger(manuf,model,location) > VALUES(?,?,?)", SQL_NTS); > > This is quite similar to one of the myODBC manualīs example. However, the > VC++ 6.0 compiler gives me the following error: > "error C2664: 'SQLPrepare' : cannot convert parameter 2 from 'char [52]' to > 'unsigned char *' > Types pointed to are unrelated; conversion requires > reinterpret_cast, C-style cast or function-style cast" > > I tried to typecast the "INSERT.. " string with (unsigned char*): > retcode = SQLPrepare(hstmt,(unsigned char*)"INSERT INTO > ger(manuf,model,location) VALUES(?,?,?)", SQL_NTS); > > Which seemed to be fine, but despite compiling and linking alright, it > really doesnt work and retcode returns an error. > > I know that myODBC is working because I already tested Direct Execution > (SQLExecDirect) with sucess. So, what may I be doing wrong? > > Thanks in advance, > Mateus Begossi > > > > > --------------------------------------------------------------------- > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before > posting. To request this thread, e-mail [EMAIL PROTECTED] > > To unsubscribe, send a message to the address shown in the > List-Unsubscribe header of this message. If you cannot see it, > e-mail [EMAIL PROTECTED] instead. > > --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php