I have a time problem since last Sat. Though my computer automatically got daylight saving time my C++ program that adds new row to MS Access table using CTime::GetCurrentTime()is still inserting time that one hour less than currentt iime. I checked Control Panel and it has correct daylight...
I'm having problem deleting class deriving from DB table from the project. Normally I delete cpp and h files for the class and also delete clw file and when I open workspace I offered to rebuld all classes and then can add new class with the same name.
However I am having problem to follow the...
I need to convert some data that I receive over Internet in String format to float and integer. So far I was not able to find conversion functions in C# help. I was looking for equivivalent of C++ atof and atoi but did not find them.
Thanks in advance, Pavel.
Thank you for this info. I was able to resolve my problem with Alex's advice. However your info helps to understand better DB interface C# commands. I will try them soon.
Thanks again, Pavel.
Both! I do not understand why I need extra single quotes. As to Parameters.Add I do not know where is actual value and where is Value keyword. In all examples I've seen so far they have the same code, like "Customer". Also I did not find in MS documentation exact syntax description of this...
Alex, you are great. It works though as far as I concerned it is very wierd syntax. I'm still trying to understand how Parameters.Add works. It may be with the same set of quotes.
Now I will try to do it with data I receive over Internet.
Thank you very much, Pavel.
Thanks Alex,
you gave me some ideas. Actually I do not want to use parameters as well. So I tried the following:
bCommand = new
OleDbCommand("INSERT INTO Symbols (Symbol) " +
"VALUES (szItem)", aConnection);
bCommand.ExecuteNonQuery();
trying to use regular SQL...
Alex, thank you very much for quick response. I've just tried to follow your advice. I was executing bCommand.ExecuteNonQuery() (bCommand.Execute was not in intellisense list) and I've got the exception message:
e.Errors[0].Message "Parameter @value has no default value." string.
Sorry, but I do...
I'm new to C# coming from C++ 6.0. I need to insert data into MS Access table. I was able to read data from table with Reader. However when I try to insert simple one item I've got from one table into another table it runs w/o errors but data is not in the table.
Here is my code:
private...
I found the resolution and I want to share it with others because I've seen few questions on the Web related to this error.
The problem was that I was opening the Batch recordset to find all batches that were not closed. If I find one I was planning to update it. Otherwise I would add new one...
Sorry, this was typo. Actual line is
pBTCH->m_CurBatch = tBatch;
with correct value in it. I've just checked it again and received the same error.
Thanks, Pavel.
I got this error on Recordset AddNew which I used many times before and have never had any prblems. I checked all values and column names and did not find any suspects. I also searched Web and did not find any meaningful answers. Here is the code:
pBTCH->AddNew();
pBTCH->m_CurBatch...
I'm trying to use CArchive to read a text file line by line.
I create a file object and then try to create CArchive object. The first trouble, if I put file creation in try/catch then CArchive does not see the file object. If I comment out try/catch then CArchive see the file but I'm getting...
Thanks for response. I am aware of Hide option and tried it already few times. But the DB still is not displayed.
However you gave me some idea. I've just tried to click on Tile Veritcally and to my sirprise the DB is displayed. the only thing it is displayed in format where all tables go down...
Something happened today with my DB that I was working with for long time. I probably hit some key or clicked on something. Now when I double click on DB file in Windows Explorer MS Access window is displayed but I can not see my data base even if I click on file and select it from drop down...
Greg, thanks for reply. Yes, I look at the query directly. It was working correctly for a while as I remember but then it started to give me result in Date sequence only.
Pavel.
I'm running the following query from time to time and though I specified "ORDER BY Stock, Date" it is always coming in Date sequence disregarding the Stock field.
SELECT *
FROM Advice
WHERE (Date>#3/27/2007 16:00:00#) AND (ProjPercent > .03) AND ( RankParm >5000) AND (((Price - ProjMin) /(...
I'm getting data from brokerage company that's supposed to be numeric. But actually it is not. I try to put it in the table and getting MS exception:
try
{
pPRC->AddNew();
pPRC->m_Stock = szStock;
pPRC->m_Date = CTime::GetCurrentTime();
pPRC->m_DayNum = iDayTrades;
pPRC->m_Price =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.