|
aaaan wrote: Bt there is no table present in the database with name myTable.
But the error message you received mentioned 'myatble'.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Did you see Databse section on the codeproject?
|
|
|
|
|
Hi friends ..i am very beginner to this field ..i dont know how to use API's .is there any articles or any url ...plz suggest me ..
Thanks n ADVANCE
raju.k
|
|
|
|
|
If you are a beginner and really are willing to learn, then you should read some good books. Windows programming has a steep learning curve. I'd suggest you the following books:
Programming Windows (fifth edition) by Charles Petzold[^]
If you'd like to do some MFC, then Programming Windows with MFC (second edition) by Jeff Prosise[^]
There are other libraries like ATL, WTL and frameworks (including non-microsoft ones, like VCF, WxWidgets, etc,.). But then you'll have to decide what you want to learn.
Trying to learn any of the above will require you to have good understanding of OOP and working knowledge in C++.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Please refrain from providing such illegal links. I've reported that download as copyright infringement to rapidshare and your post as abusive.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
well there was nothing abusive in that. well if u felt so then i am sorry for that. i justed wanted to help him. that's all.
|
|
|
|
|
Chandrasekharanp wrote: well there was nothing abusive in that.
You're abusing the spirit of this community. We don't provide illegal material here.
Chandrasekharanp wrote: i justed wanted to help him. that's all.
I appreciate your efforts. But I suggest that you provide link to anything that is legal.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
this was not known to me. and i dint know that the site which i gave was illegal.
|
|
|
|
|
I guess he want to uses of Win32 not MFC,maybe.
|
|
|
|
|
|
It is good you're helping out, but the tutorials are a little bit outdated. Also, I think starting from Visual studio 4 now is not a very good idea.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
He need ebooks or article and you gave him link that is not freeware and both link is helpful from my point of view.
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
raju.k wrote: i dont know how to use API's .
So tell us what you do know. It really does you no good for us to suggest a book/site when it is potentially over your head.
Learning to program (in a procedural language) is one thing (e.g., concepts), while learning to program in C is simply learning a particular syntax.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
What do you need and what do you want to do exactly?
|
|
|
|
|
I need to output a group of curves (y(i,j) with the same x-axas x(i)). Each iteration, I need to write each column of y(i,j) into the same file like:
x(1) y(1,1) y(1,2) y(1,3)...
x(2) y(2,1) y(2,2) y(2,3)...
x(3) y(3,1) y(3,2) y(3,3)...
x(4) y(4,1) y(4,2) y(4,3)...
The length of each column may be different depending on a condition for termination of each iteration.
After each iteration, one column of y will be added.
Please help me on how to handling the file.
Thanks
|
|
|
|
|
See if this helps:
CStdioFile csf;
CFileException cfe;
CString str, sTemp;
CStringArray csa, csa2;
int iSize=0;
int n=3;
for(int i=1; i<=n; ++i)
{
sTemp.Format(_T(" (%d,%d)"),i,n);
csa2.Add(sTemp);
}
if ( !csf.Open(_T("E:\\Some.txt"), CFile::modeReadWrite, &cfe) )
{
AfxMessageBox(_T("Failed to open the file"));
return;
}
int iLoop = 0;
while(csf.ReadString(str))
{
str.Format(_T("%s%s"),str, csa2.GetAt(iLoop));
csa.Add(str);
++iLoop;
}
csf.SeekToBegin();
iSize = csa.GetSize();
for(int j=1; j<=iSize; ++j)
{
sTemp.Format(_T("%s\n"), csa.GetAt(j-1));
csf.WriteString(sTemp);
}
csf.Close();
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Rajesh,
Thank you very much for the help.
I am using the
CString file_now;
FILE *f_ptr1;
f_ptr1 = fopen(file_now,"r");
//
fprintf (f_ptr1, "%s\n", tittle);
fprintf (f_ptr1, "%i\n", n_monitor );
.....
.....
Do you think I can implement your above code in this FILE system ?
Thanks
|
|
|
|
|
Thanks. It seems to me that the above code is not dealing with different lengths of different different columns ??
Each time I need to write two columns of data of the same length, but next two columns may be of different length, e.g.
x1 y1 xx1 yy1
x2 y2 xx2 yy2
x3 y3 xx3 yy3
xx4 yy4
Each column of the data may have different lenthes.
If you can clarify further that would be great to me. Thanks.
modified on Monday, February 11, 2008 6:19 PM
|
|
|
|
|
mrby123 wrote: x1 y1 xx1 yy1
x2 y2 xx2 yy2
x3 y3 xx3 yy3
xx4 yy4
Look at the first for loop. Try modifying the line
sTemp.Format(_T(" (%d,%d)"),i,n); That's where the array element which fills the CStringArray is being built. Should be easy. Think about a solution and try. If you have a problem, write again.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
The following is what I tried, but not work.
x-xy[i], y_z[i] are two new columns to be appended to the previous file "some.txt".
n is the number of elements in a column.
Please correct my code. Thanks
-------------------------------------------------------------------------------------
//Create a CStringArray which would hold the new column to be added
for(i=0; i<n; ++i)
{
sTemp.Format(_T(" (%d,%d)"),x_xy[i],y_z[i]);
csa2.Add(sTemp);
//AfxMessageBox(sTemp);
}
if ( !csf.Open(_T("some.txt"), CFile::modeReadWrite, &cfe) )
{
AfxMessageBox(_T("Failed to open the file"));
return;
}
int iLoop = 0;
while(csf.ReadString(str))
{
str.Format(_T("%s,%s"),str, csa2.GetAt(iLoop));//Read each and every line in the file
csa.Add(str);//and append the new column to each line
++iLoop;//loop through each line
}
csf.SeekToBegin();
int iSize = csa2.GetSize();
for(int j=0; j<iSize; ++j)
{
sTemp.Format(_T("%s\n"), csa2.GetAt(j));
csf.WriteString(sTemp);//Finally write it to the file
}
csf.Close();
|
|
|
|
|
Hi,
Can anyone let me know how to identify whether an exe (which is not already running) is a service or non-service application?
I am writing a program which will run any application after getting a command.
I understand that if an application is a normal app.(non-service), I can start it using CreateProcess(). But if its a service I need to use OpenSCManager(), StartService() etc..
For this, i first need to know if an application is a service or not.
Please confirm my understanding and also how to identify if an application is service or not (when it is not running).
Thanks in advance,
Manasi
|
|
|
|
|
Manasi D wrote: But if its a service I need to use OpenSCManager(), StartService() etc..
I think u meant services already install in the Service control manager database.
If the service is already installed, u can query for the services installed using EnumServicesStatusEx and get the binary file name for the service using QueryServiceConfig and compare it. This is not an optimised solution
|
|
|
|
|
I used to use the LPT port in a program in Windows XP. In order to get access to the port, I used TotalIO.
Now I am using Windows Vista 32-bit, but I can't get TotalIO to work. It says the service is loaded successfully, but I still do not get access to the x86 assembly in and out instructions. I still get the priveledged instruction error. I have even tried running as Admininstrator with XP compatibility.
Has anyone had any success with getting port access in Vista that has any tips?
Please note: I want to avoid using inpout32.dll; although if it is the only option I will. The reason is, in my experience, TotalIO is MUCH MUCH faster than inpout32.dll.
modified on Thursday, February 7, 2008 9:03 PM
|
|
|
|
|
It seems strange that it worked on XP: the in and out instructions are privileged in XP too and so can only be executed from kernel mode (i.e. by drivers, for example.)
Steve
|
|
|
|