Click here to Skip to main content
16,007,163 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPassing WM_PAINT to dll from EXE Pin
Chris Klecker21-Jul-02 4:14
Chris Klecker21-Jul-02 4:14 
GeneralRe: Passing WM_PAINT to dll from EXE Pin
Paul M Watt22-Jul-02 6:42
mentorPaul M Watt22-Jul-02 6:42 
GeneralPassing String from COM to VB Client Pin
Anonymous21-Jul-02 2:39
Anonymous21-Jul-02 2:39 
GeneralRe: Passing String from COM to VB Client Pin
Dudi Avramov21-Jul-02 3:32
Dudi Avramov21-Jul-02 3:32 
GeneralRe: Passing String from COM to VB Client Pin
Anonymous21-Jul-02 6:58
Anonymous21-Jul-02 6:58 
Generalnot reading the file when executed from start menu Pin
a3gupta21-Jul-02 2:29
a3gupta21-Jul-02 2:29 
QuestionPainting etc - gdi?? Pin
Anonymous21-Jul-02 2:13
Anonymous21-Jul-02 2:13 
GeneralDataSet Pin
laphijia21-Jul-02 2:06
laphijia21-Jul-02 2:06 
I am trying to retrive a some data from a database,
filling a dataset,
modyfieng the data,
updating the database.

I have the gotdotnet guide on how to make this, in Managed C++:

{
// Database connection string
SqlConnection* myConnection = new SqlConnection (S" User ID=;Password=;Initial Catalog=catalog;Data Source=(local)");

// Open connection
myConnection->Open();

// SQL Query
// Create the SQL statements inserting the Username and the Password received as parameters.
String* szQuery = String::Concat("SELECT * FROM Users WHERE UserID = '", szUsername);
szQuery = String::Concat(szQuery, "' AND Password = '");
szQuery = String::Concat(szQuery, szPassword);
szQuery = String::Concat(szQuery, "'");


SqlDataAdapter* mySqlDataAdapter = new SqlDataAdapter(szQuery, myConnection);
DataSet* myDataSet = new DataSet();


mySqlDataAdapter->MissingSchemaAction = MissingSchemaAction::AddWithKey;
mySqlDataAdapter->Fill(myDataSet, "Locals");

DataRow* myDataRow = myDataSet->Tables->Item["Locals"]->Rows->Item[0]["ContactName"]="Peach"; //this line gives error Confused | :confused: C2107
SqlCommandBuilder* mySqlCommandBuilder = new SqlCommandBuilder(mySqlDataAdapter);
mySqlDataAdapter->Update(myDataSet,"Locals");

}

but the line where i try to modify the data in the DataRow gives the error: error C2107: illegal index, indirection not allowed

How I fix it please?

P.S.
I cannot access it through the Find method, because I am not able to know the value of the primary key to research.

Confused | :confused:

"Nelle cose del mondo non e' il sapere ma il volere che puo'."
GeneralOnDraw v.s OnPaint Pin
Dudi Avramov21-Jul-02 1:44
Dudi Avramov21-Jul-02 1:44 
GeneralRe: OnDraw v.s OnPaint Pin
NormDroid21-Jul-02 3:01
professionalNormDroid21-Jul-02 3:01 
GeneralRe: OnDraw v.s OnPaint Pin
Dudi Avramov21-Jul-02 3:35
Dudi Avramov21-Jul-02 3:35 
GeneralRe: OnDraw v.s OnPaint Pin
loket21-Jul-02 4:09
loket21-Jul-02 4:09 
QuestionIs there any syntax to do this? Pin
AJ12321-Jul-02 0:42
AJ12321-Jul-02 0:42 
AnswerRe: Is there any syntax to do this? Pin
Martin Ziacek21-Jul-02 0:56
Martin Ziacek21-Jul-02 0:56 
GeneralVisual c++ 6.0 Pin
amit prakash srivastava20-Jul-02 22:04
amit prakash srivastava20-Jul-02 22:04 
GeneralRe: Visual c++ 6.0 Pin
Christian Graus21-Jul-02 0:17
protectorChristian Graus21-Jul-02 0:17 
GeneralDocking CToolBars Pin
Paolo Vernazza20-Jul-02 15:54
Paolo Vernazza20-Jul-02 15:54 
GeneralRe: Docking CToolBars Pin
Nish Nishant20-Jul-02 16:35
sitebuilderNish Nishant20-Jul-02 16:35 
GeneralRe: Docking CToolBars Pin
Paolo Vernazza21-Jul-02 7:20
Paolo Vernazza21-Jul-02 7:20 
QuestionVisual Studio .NET for game programming??? Pin
merlin987620-Jul-02 14:19
merlin987620-Jul-02 14:19 
AnswerRe: Visual Studio .NET for game programming??? Pin
Paul Ingles20-Jul-02 15:15
Paul Ingles20-Jul-02 15:15 
AnswerRe: Visual Studio .NET for game programming??? Pin
Gerald Schwab20-Jul-02 15:16
Gerald Schwab20-Jul-02 15:16 
AnswerRe: Visual Studio .NET for game programming??? Pin
Michael P Butler21-Jul-02 9:16
Michael P Butler21-Jul-02 9:16 
GeneralRegistering an .OCX file manually and through setup program Pin
a3gupta20-Jul-02 13:22
a3gupta20-Jul-02 13:22 
GeneralRe: Registering an .OCX file manually and through setup program Pin
super20-Jul-02 19:03
professionalsuper20-Jul-02 19:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.