Hi all,
I am developing a Web Service application on .NET 4.0. with VB.NET. using System.Data.ODB C as the data connector to Oracle 10G database.
Somehow i need to perform some updating and insertion of accounts information by batches into database. Thus, i used an odbcTransaction object to commit or rollback the updating/insertion in batches as well. In some scenarios, i would be having about 1000 SQL statement in a single...
User Profile
Collapse
-
Maximum buffer size of an odbcTransaction object in .NET 4.0
-
Just my personal opinion.
I think you have some miss understanding with what your code is doing compare to what you actually wanted it to do.
First of all, you have wroteyou have 3 vectors which store first name, last name and score respectively. Then you wanted them to be sorted by last name.
After your sorting operation, what is sorted is only the vector storing the last name, the other two still remain the... -
haha, i think i am almost there. thank you. I always forgotten the concept of "a copy of the actual parameter, NOT the actual parameter itself". Thank you.
Just one more point to go, let's say those statements in my example are being done in one main(), i didn't so any function calling, then intArray++ is totally wrong. My GCC compiler complainted "Wrong Type Of Argument to Increment". : )
intArray++...Leave a comment:
-
-
Array name is a constant pointer. So, how can we do pointer arithmetic on array name like intArray++ at the first place? This statement is equivalent to intArray += 1.
What does the "assigned" meant? We cannot change the value contained by array name, am i correct ? IT ALWAYS POINTS TO THE FIRST ELEMENT IN THE ARRAY. but how could intArray++ works at the first place? it is changing the value of intArray....Leave a comment:
-
Thank you for the site, it has cleared most of my doubt. : ) . Let me clarify again with i have understand so far.
Result of these statements: 12345.
*(intArray + i) == intArray[i], I am pretty sure with this.
Let's do some desk check.
When i = 0, print: 2
i = 1, print: 3
i = 2, print: 4
i = 3, print: 5
...Leave a comment:
-
Common mistakes that trapped me always!
I did C in UNIX environment. These are some of the common mistakes that always trapped me in my work. I need help from you guys to clarify them with me.
1)[CODE=c]
int intArray[5] = {1,2,3,4,5}, i;
for(i = 0; i < 5; i ++){
printf( "%d", *(intArray + i) );
}
[/CODE]
As we know, array name ,intArray is a constant pointer, it always point to the... -
@@ oh....thanks. : )
haha, sure. Good luck and cheers ~~ : )...Leave a comment:
-
You declare a global array of type MyStr which consists of 3 elements. But you pass them as below
is it correct? this mean "pass the address of the memory location which point to the first element of the array? hence, you need to use two * (Code:GetBuffer(&MyStrPointer, &numseq);
int GetBuffer(MyStr **SSPtr, int *size)) to receive them in the called function ? I thought we need to pass the name of the array only when...Leave a comment:
-
I have some doubts after reading through your program, i would like to point them out here to gain some clarification from you all.
1) Line 21 & 24
You declared a integer variable, numseq but didn't initilialize them, is it alright in the context of C programming? i thought we should always initialize any variable in C before we use them, in this case you pass the variable by reference to a function.
2) Line...Leave a comment:
-
First of all, you must make it very clear between "string" and "character" in C.
This two have distinctive differences.
For example: "qwe qwe qwe" is a string with 3 "WORDS". Each word consists of 3 CHARACTERS. These 3 WORDS form a STRING in C. And the words is deliminated by a SPACE. THIS IS THE FUNDAMENTAL KNOWLEDGE.
The problem you mentioned is a common buffering bug...Leave a comment:
-
You mean you want to use the same variable across different soruce file and its value must be preserved? You didn't specfy C or C++. I assume you mean C. Technically, yes.
The easiest way is to use global variable but it is not advise to use global variable. check it out yourself. And you need the keyword " static" to make its value contained in the variable preserved by the program. Checks the "variable scope"....Leave a comment:
-
yes, use space prior to your format string. ie. scanf(" %d", &num); will ignore any preceeding white space until it hit a non-white space input...Leave a comment:
-
Please do some reading yourself regarding <ctype.h> library function. There are some function which can check the input type for you i.e. decimal number, float , character etc.
Second option, write a function yourself that check each input from buffer, which get input from standard input device like keyboard.
There are other ways to do this as well, for example checking ASCII code for the input enter from keyboard...Leave a comment:
-
Passing 2-D array to a function. I think you need to check it out yourself.
I don't think you need to specify the 1st dimension in the calling function, which u mentioned u passed in to the function. The compiler would just ignore it , the important one is the 2nd dimension. Segmentation fault might be encountered due to the improper passing of argument to your function which then access those memory location that you are not allow...Leave a comment:
-
I will start to learn JAVA on the coming January! yeah ..JAVA here i come ^.^Leave a comment:
-
Please do some reading before your ask such question.
However, i can give you some hints on this. Use fgets(), fread() etcLeave a comment:
-
I didn't go throught your code in detail, but roughly know what you want to do.
First of all, for efficiency wise, i want to advice you to pass in the pointer of the structure to the function instead of passing the whole structure one at a time. check this out.
Do you mean that you want to update the value of the variables within your structure? use dot "." operator or "->" short hand operator...Leave a comment:
-
You are more welcome ^.^
For your knowledge wise, scanf() and fsanf() will get every input from your buffer untill it hit the first white space character (tab, new line, space etc), thus, if your enter an string which consists white space as your mentioned, fscang() only accepts the first word ie "my" only.. there is two ways to resolve this problm
1. use "%[^\n]" in your format string argument i.e....Leave a comment:
-
fgets() used wrongly, in your case, the last argument is wrong. Try to change it to STDIN. Check it out.
what do you want to do with the file pointer i.e file? are you sure what you are doing will achieve what you expected? do some reading dude. ^.^...Leave a comment:
No activity results to display
Show More
Leave a comment: