|
zpzhou2008 wrote:
I don't know why '\"+m_Name+"\' write like ?
m_Name is a variable, probably a CString or std::string . It is surrounded by single quote marks because the variable might contain spaces that are necessary for the query.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Thanks DavidCrow! Here is a SQL statement that used in VC by ADO
CString strSQL ="SELECT Date,Min(ReduceTime) FROM NormalReduceTime WHERE Name in
(SELECT DISTINCT includetime FROM SetTimeSegement
WHERE NAME='套播一')group by date order by date "
Why I execute in Query Aaanysize successfully,
but after I used it in VC and execute it ,it had no response,otherwise to say:
it didn't worked successfully as I imaged and had no data queried out!
What had happened to me ?
thanks
Reply me will give you a smart patient
|
|
|
|
|
zpzhou2008 wrote:
...but after I used it in VC and execute it ,it had no response...
Without seeing the exact code you are using (not just the strSQL variable), it's impossible to offer any suggestions.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
k, say i have a structure like
struct MYSTRUCT
{
char somestring[64];
int number;
int number2;
};
now i would like to be able to write an array of this structure to a file
and then it read it again, preferable with a non fixed length, would it be possible to do this?
|
|
|
|
|
you can use CFile or FILE structures to print to file.
Dynamic arrays are CArrays I think. (It's been a while )
More info on MSDN.
If you don't have MFC then you can write your own CArray class which isn't that difficult.
good luck.
No hurries, no worries.
|
|
|
|
|
Hello,
Archer282 wrote:
would it be possible to do this?
Yes!
Does:
std::ostream ostr;
for( int i = 0; i < nYourArraySize; i++ )
ostr << YourArray[i].somestring << YourArray[i].number << YourArray[i].number2;
help?
Behind every great black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
1: If a want to make a programs that can send and recieve requests with one another, would sockets be the usual way to construct that interface?
2: can only one program or many connect with one server on one port? ie, do I have to have an open port each time my program wants to make a simultaneous connection?
3: Is there an easy way to connect between two languages? ie some easy way to program a universal way of sending back and forth. In sockets, python has pickling and mfc has csocketfile for working with data. Is there something like this that works with both C++ and python, or should just search the libraries for this?
Thanks for the help!
|
|
|
|
|
Using sockets should be perfectly compatible accross languages
you might also want to check out Pipes
|
|
|
|
|
yeah, you can depend upon socket for universal data transfer it will work with every Socket aware langauge without any problem.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
an older method is the handshake method. That's how the old modems work if I'm not mistaken.
Suppose Program A and B
A writes a file to disk for B to read and waits until B replies with a file. In the meantime B picks up the file, reads the data and replies to A etc etc.
The method is quite old and there are probably better ways, but it still works.
good luck.
No hurries, no worries.
|
|
|
|
|
i want to write some plugins for windows media player, but i honestly cant find out how, i spent quite some time on google looking for examples and tutorials but so far not one thing has proven to be useful
anyone think they can provide some information?
anything you can tell will be much appreciated.
|
|
|
|
|
Hi, can someone tell me what is a byte? how many bits does 1 byte equals to?
|
|
|
|
|
A byte is equal to 8 bits. It has the same size as a character.
|
|
|
|
|
Ok. Thanks. Is it possible to compress 8bits into a byte using RLC( Run-Length Coding)?
|
|
|
|
|
You don't need to compress anything there - a byte is 8 bits.
|
|
|
|
|
Does that means I am actually shrinking the size of the data?
|
|
|
|
|
sclh wrote:
Does that means I am actually shrinking the size of the data?
Nope.
When you have an 8-bit binary number - that's a byte.
Exmaples of bytes are 10010010, 10001000, 11111111, 0 (00000000), 10000001 etc.
The decimal equivalent of the largest unsigned byte is 255. So if you have a byte variable, it can represent any of 256 values (0 included).
|
|
|
|
|
Ok, thank you for the info. Perhaps I will go and read up and find out my problem then I will consult help again.Thanks.
|
|
|
|
|
No, to compress with rle you need at minimum 4 bytes (32 bits). I assume you read the article at http://www.arturocampos.com/ac_rle.html[^] about RLE. I also believe it explains rle compression pretty well. Do you have any specific questions about the article or rle? Is your problem homework or for some other purpose? I ask this because rle is definitly not the best algorithm to use. And there are several source code compression libraries that you can download and use for free.
John
|
|
|
|
|
cedric moonen wrote:
A byte is equal to 8 bits.
Only for UTF-8. You could also have UTF-16 which would be a 16-bit byte (e.g., Unicode).
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
AFAIK, a byte is always 8-bits.
[edit]
I just saw the reference to the article that said there used to be 6-bit bytes, but today's byte is 8-bits in length.
[/edit]
I believe UTF-16 uses a 16-bit (i.e. 2 byte) "word". Hence, MBCS, DBCS, etc. refer to multi-byte, double-byte..., etc.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Fair enough. I rarely deal with such things, so I was just mainly throwing it out on the table for further discussion.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
the word byte comes from By Eight. Meaning they took eight bits together
No hurries, no worries.
|
|
|
|
|
|
ok I stand corrected.
No hurries, no worries.
|
|
|
|