Click here to Skip to main content
15,885,947 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
C++
string^ constring=L"datasource=localhost;port:80;username=root;password='';";
MySqlConnection^ conDatabase=gcnew MySqlConnection(constring);
MySqlCommand^ cmd=gcnew MySqlCommand("select * from eventor.user",conDatabase);
MySqlDataReader^ myreader;
try
{
conDatabase->Open();
myreader=cmd->ExecuteReader();
}
 catch(Exception^ ex)
{
 MessageBox::Show(ex->Message);
 }

there is a problem in th constring and string

1>c:\users\sony\documents\visual studio 2010\projects\student database\student database\Form1.h(134): error C2065: 'string' : undeclared identifier
1>c:\users\sony\documents\visual studio 2010\projects\student database\student database\Form1.h(134): error C2065: 'constring' : undeclared identifier
1>c:\users\sony\documents\visual studio 2010\projects\student database\student database\Form1.h(135): error C2065: 'constring' : undeclared identifier


help me
Posted

1 solution

Should string not be with a capital S - String[^].
 
Share this answer
 
Comments
bhawin parkeria 17-Aug-13 4:14am    
okk this one got correct but i got another error,

error-> heyword not supported: parameter name: port:80;username.
bhawin parkeria 17-Aug-13 4:32am    
okk this time get it myself


thnx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900