I am facing a situation where I have to store the data of the Customers in application.
So I have created an ?EDIT? window with CreateWindowEx. Now, if the data is entered in the ?EDIT? box, it should get stored in the Oracle database. So I went through the ODBC tuts by Iczelion?s ?ODBC tuts?. I can understand the data access part but I cannot plan for my purpose, that is, data input from the ?EDIT? window to Oracle database. Even though it is for MsAccess I think I can access the .dsn file from my program (correct me if I am wrong). So, help me in storing the data entered in ?EDIT? window. Help me by way of topics but not by giving me program. I am trying to create a whole application in NASM,, and nagoa.obj, Alink.

Posted on 2003-03-30 07:58:24 by sathyashrayan
If I understand your problem, you should use an UPDATE or INSERT SQL instruction to put the data inside your database... and execute it using ODBC API...
Posted on 2003-03-30 15:21:22 by JCP
No,sir, it is not putting the data in database, my question is not that, but storing the text entered in EDIT window somewhere. Create an ?EDIT? window with appropriate style; enter the text in the ?EDIT? box, that text should be stored in the database. So my problem is retrieving the text string from the ?EDIT? window.
Posted on 2003-04-02 11:39:03 by sathyashrayan
GetWindowText() ? ?_o
Posted on 2003-04-02 11:43:45 by JCP
I have used the above function (as a test in VC++ first) but I am getting the illegal operation during the runtime. I wanted to test it weather the string getting stored in the buffer. If it does not matter I will give the vc++ code.

And in WndProc():
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps); //handle to the DC for printing hello
hdc1 = BeginPaint(hWnd,&ps1);//for printing the EDIT string

RECT rt,rt1;

GetClientRect(hWnd, &rt);
GetClientRect(hWnd, &rt1);

DrawText(hdc, "hello",strlen("hello"), &rt, DT_CENTER);

GetWindowText(bhinst1,buffer,sizeof(buffer)); //buffer is in the global scope of char * .But this is asm so does not matter of the type.
DrawText(hdc1, buffer,strlen(buffer), &rt1, DT_BOTTOM);
EndPaint(hWnd, &ps);
EndPaint(hWnd, &ps1);

The above code is very ugly but I made it in the idea of testing. I have seen VB projects with text box. The data entered in the text box will get stored in the Oracle database or msAccess. I want to do exactly that in win32asm. I am using EDIT instead of text box.
I want to make full win32asm application just as a practice but not for making money.
I just need a simple algo, which can be used by the entire window for user input that can be stored in the database. Never mind if it in VC++ (in SDK).
Posted on 2003-04-03 04:28:37 by sathyashrayan
Why are you doing two BeingPaint and GetClientRect?
Posted on 2003-04-03 07:47:29 by f0dder