|
I have a C program that prints the tuples in a text file. I am looking for a way, such that those tuples be inserted into MS Access database instead of printing into a text file.
How can I do this?
|
|
|
|
|
Use two tables: one containing the tuple name, and the other containing the tuple data. Link them together with a "key" field.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
I have 14 tables in MS Access. I need to insert the tuples in those tables. Is there any way to insert by SQL Commands. I used fprintf to print those tuples in text file. Now need to inset in my existing MS Access tables.
|
|
|
|
|
sxkoirala wrote: I have 14 tables in MS Access.
Are you implying that adding two more would not be possible?
sxkoirala wrote: Is there any way to insert by SQL Commands.
Yes. Are you using MFC?
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
i have a simple database application,and it has 5 edit boxes.
Whenever the application starts i want the application to populate the editboxes with whichever record is available at the top of the table(i.e the first record in the table.)
I m using ADO.
How do i do this ?
Do i have to use a sql query for this or MoveFirst( ) function ??
As im using a Doc/View i have to insert this in view`s OnInitialUpdate() function.
But how do i do that ?
modified on Thursday, May 14, 2009 1:03 PM
|
|
|
|
|
See the example here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
See here and here and here and here.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I have a lib Linker problem.
I built "nurbs" dll. This gives me a lib and a dll.
When I tried to link the lib and used " /FORCE:MULTIPLE". . I got a lot of warnings which look like:
warning LNK4006: "void __cdecl PLib::resizeKeepBasic2DArray<struct PLib::HPoint_nD<float,2> >(class PLib::Basic2DArray<struct PLib::HPoint_nD<float,2> > &,int,int)" (??$resizeKeepBasic2DArray@U?$HPoint_nD@M$01@PLib@@@PLib@@YAXAAV?$Basic2DArray@U?$HPoint_nD@M$01@PLib@@@0@HH@Z) already defined in drawtool.obj; second definition ignored.
How can get rid of warning and not using "/FORCE:MULTIPLE".
Best regards,
modified on Thursday, May 14, 2009 12:38 PM
|
|
|
|
|
That says to me that PLib::resizeKeepBasic2DArray is contained in a header and not marked as inline , so there are multiple definitions of the code. You need to either a) mark it as inline, or b) ensure it's only contained in one .cpp file.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi
You are great.
I have one more question for you.
How about the static data member? like "static T dumbVar ;" in the following:
template <>
struct HPoint_nD<double,2>
{
typedef double T;
T *data ;
int created; // usefull to change the data pointer
Point_nD<T,2> projectW() { return Point_nD<T,2>(x(),y()) ; }
protected:
static T dumbVar ;
};
|
|
|
|
|
transoft wrote: How about the static data member? like "static T dumbVar ;" in the following:
Needs to be defined in a cpp file somewhere. This code won't link, because Test<int>::y is missing.
template<class T>
class Test
{
public:
static int y;
};
template<>
class Test<int>
{
public:
static int y;
};
int main()
{
Test<int>::y = 120;
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I have four arrays as input, then used it in a function that result an output. Then I sorted the output array. Next step, I want to find the index and the value of the input array that resulted the sorted array. I keep getting the wrong result.
Here my (part of) code (forgive me for my poor codes;
for (i=0; i<size2; i++){
for (l=0;l<point3[i];l++){
for (a=0;a<b[i][l];a++){
gradient [i][l][a]=(S[i][l][a]-Cy[i][l])/(R[i][l][a]-Cx[i][l]);
}
for (a=0;a<b[i][l]-1;a++){
for (d=a+1;d<b[i][l];d++){
if (gradient[i][l][a]>=gradient[i][l][d]){
temp=gradient[i][l][a];
gradient[i][l][a]=gradient[i][l][d];
gradient[i][l][d]=temp;
}
}
}
}
}
for (i=0;i<size2;i++){
for (j=0;j<point3[i];j++){
for (k=0;k<b[i][j];k++){
for (l=0;l<b[i][j];l++){
if (fabs((S[i][j][l]-Cy[i][j])/(R[i][j][l]-Cx[i][j]))==gradient[i][j][k]){
}
}
}
}
}
The result I have is not for entire array, but just R[1][1][3] and S[1][1][3];
What should I do to fix it?
Thanks.
|
|
|
|
|
What about debugging?
Jaguks wrote: if (fabs((S[i][j][l]-Cy[i][j])/(R[i][j][l]-Cx[i][j]))==gradient[i][j][k]){
Why are you using fabs in the above line?
Are you aware that == operator on float (or double ) values is tricky (i.e. (f1==f2) should be replaced, usually, with (fabs(f1-f2)<eps) (where eps is a small quantity, problem-dependent)?
BTW: the fancy changes of the index names, in different blocks of code, are done to deceive the enemy?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini, Jaguks,
I find it difficult to believe that the hardware would calculate a different value for gradient in the first set of generation and sorting code than it calculated in the second set of checking code. The values are not retained in the FPU as temporary real values, but are saved in variables and then sorted. The truncation indicators would not be changed either, so the checking gradient should match the creation gradient, no matter where it appeared in the array.
Having all of the associated code and declarations would help. The //printf must really be just printf, otherwise nothing would be output.
One possibility that would cause this limited output is that the swap variable is of a different type than the actual variables (float vs double) and the swapped variables are truncated during swapping. This might cause the second calculation of gradient to be a double, but it would not match the swapped first generation variable which was truncated to a float, then propagated back to a double. Cannot determine this without the full code and/or declarations.
Dave.
|
|
|
|
|
Jaguks,
Sorry for the double post, but I figured out what went wrong.
The second block of code is just reporting which gradient elements are in their original positions (as created). Only one remains in the same place, gradient[1][1][3] created from R[1][1][3] and S[1][1][3].
To do what you want to do (report the initial creating index values) you must save the creating index values along with the gradient value, either in a structure containing all four of the items (an array of structures instead of an array of gradient values), or else in a separate array of structures (each structure containing the index values) that is built along with building the gradient value array. When swapping the gradient values, you must also swap the index values structures if they are a separate array, or else swap the four element structure instead of just the gradient value if they are in a combined stricture.
The reporting code block can then eliminate the test and then just report the gradient and its associated generating index values, and the R and S values. The generating index values would come from either from the combined 4 element array of structures, or from using both the gradient array and the index values array of structures. In the new report, i,j,l would be used only to select the gradient value and its associated saved index values, the saved index values would be used to select the R and S values for reporting, and for reporting the i,j,l values.
In general, you must save the index values with each created value to be sorted in order to be able to report which index created any sorted value.
Dave.
modified on Friday, May 15, 2009 10:52 AM
|
|
|
|
|
Hi,
I have an app in my system tray. On a special key press, would it be possible to change system cursor to a custom one without having it changed regardless what other applications under the cursor might want to change it to? For instance, when holding down CTRL+ALT, my new cursor shows but it is quickly overriden by Internet Explorer because now I'm pointing on a url link (forcing the cursor to become a pointing hand).
Disregard the fact that doing this - if at all technically possible - is not recommended for issues of interference and weird and unexpected behavior.
Thx!
/T
|
|
|
|
|
Tommy Svensson wrote: would it be possible to change system cursor to a custom one
Well, I haven't tried it exactly; let me share some ideas or workarounds.
You can change the system cursors to a custom one using either one of the following or in a combination of two.
1. SystemParametersInfo : Retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter.
2. SetSystemCursor : Enables an application to customize the system cursors. It replaces the contents of the system cursor specified by the id parameter with the contents of the cursor specified by the hcur parameter and then destroys hcur.
I will recommend the 1'st one to try out, beacuse by using this API you can do anything that you done to change the Desktop settings manually. Use the SPI_SETCURSORS parameter for changing cursor.
You may get some ideas from
1. http://www.thebitguru.com/articles/14-Programmatically%20Changing%20Windows%20Mouse%20Cursors[^]
2.http://msdn.microsoft.com/en-us/library/ms724947.aspx[^]
3.How to programatically disable/enable screen savers/power management[^]
*4. The google codesearch[^] result
|
|
|
|
|
\ i don't know how to show the widget like in ide status.
|
|
|
|
|
what is the question ?
Adding "stuff" in the Status Bar ? see Illustrates Custom Control Bars[^]
Moving "Widgets" around ? You need to do this manually or use some of the many layout managers; If the "widgets" are in the
status bar, you are lucky, they should be moved automatically when the window is resized.
This signature was proudly tested on animals.
|
|
|
|
|
sorry confusing it.
for example:
i want to show a button in my windows form on runtime, and its style is like the edit status when you create application resource in VS ide window, can resize, rename caption, modify its property.
|
|
|
|
|
i found a sample code, named "designerhost", but it was achieved by C#.
|
|
|
|
|
Hi,
How do I load an existing image (icon or bitmap, whichever is possible) to an existing ToolBar without actually having to draw it?
Thanks
sft
|
|
|
|
|
why ?
You could try to get the CListImage (CToolBarCtrl::GetImageList) attached to the toolbar, grow it and insert a new image into that.
This signature was proudly tested on animals.
|
|
|
|
|
sir
i am making on a banking project which is based on desktop application
in which we want to provide passward to each customer
but how wiil we provide passward to customer so that when user enter the passward
then employee unable to see that passward
and after entering the passward the bank teller can see the hole informatin about the bank
sir i am working with c as a front and file system for data storage
|
|
|
|