Thanks... That helped me alot :)
The_Server
Posts
-
Split it -
Split itThank you for your answer I think SqlDataAdapter is in use by C# or VB but I'm using Visual Studio to create reports, so I need a query to do that. I thought about somthing like that
**DECLARE @page_num int DECLARE @rows_in_page int DECLARE @temp1 TABLE ( aaa nVarchar(100), bbb nVarchar(200), ccc float, ddd int) DECLARE @SQL nvarchar(4000) SET @page_num = 3 SET @rows_in_page = 15 INSERT INTO Temp1 = SELECT * FROM myTable** [[[ now @temp has all records ]]] **[--> some code to delete the first 30 records ((page_num-1)*rows_in_page) <--]** [[[ now @temp1 has pages 3,4,5,6,.... ]]] **SET @SQL = 'SELECT TOP ' + @rows_in_page + ' * from @temp1'** [[[ now the variable @SQL = "SELECT TOP 15 * from @temp1" ]]] **EXECUTE (@SQL)** [[[ the EXECUTE will give me the first 15. That means only page 3 ]]]
Can anyone post the missing code ? -
Split itHi all, I have a table with 50 rows I need to split the resoults of the select to pages. page 1 will have the 1st 15 rows page 2 will have the 2nd 15 rows page 3 will have the 3rd 15 rows page 4 will have the remaining 5 rows is there a query that can make my life easy somthing like
SPLIT_IT ( [page_num], [rows_in_page], SELECT * from myTable)
thanks -
Complex Select QueryI'm not much of an SQL query expert, But I think that I have a solution
SELECT SchoolCode, COUNT(First) As TotalFirst, COUNT(Second) As TotalSecond, COUNT(Third) As TotalThird, COUNT(Fail) As TotalFail, (COUNT(First) + COUNT(Second) + COUNT(Third) +COUNT(Fail)) As TotalTotal FROM ResultData GROUP BY (SchoolCode) I havent tested it.
Post a reply to let every body know if it works. -
SQL lack of knowladgeHi all... I m a CPP Developer. started learning SQL while I was in high school I know only "SELECT D.A,D.B,E.C FROM D,E WHERE D.id=E.id" I need to know much more complex stuff and fast... Does anyone know any good tutorials or books. thanks alot. :sigh:
-
JS: calling another HTML functionFound it ;)
//this frame_A
function doit(){
parent.frames["frame_B"].runme();
} -
JS: calling another HTML functionHi all :) Well... I know it is a simple question for guys like you, But I need an answer. I have an HTML with 2 FRAMES. Frame A & B. I need that when function "doit()" runs on 'A', it will call the function "runme()" on frame 'B'. and the function runme() will run on the 'B' frame and will change the 'B' parametrs. is there a way to do it ? ? Somthing like:
function doit()
{
runme(); // will call runme() on 'A'
B.runme(); // will call runme() on 'B'
}JavaScript of course. 10x ---------- The Server
-
Dialog Box errorI tell why it works... :-O it didn't work because your dialog window didn't recieve the messages. :-O Now it works because your dialog now recieves the messages... that is why we need to use
TranslateMessage
andDispatchMessage
. :-O -
Dialog Box errorHey... dude... You need to change your
while (g_run);
line to this lines:BOOL bRet; MSG msg; while ((g\_run) && ( (bRet = GetMessage(&msg, NULL, 0, 0)) != 0 )) { if (bRet == -1 ) { // handle the error and possibly exit } else if (!IsWindow(hwnd) || !IsDialogMessage(hwnd, &msg)) { TranslateMessage(&msg); DispatchMessage(&msg); } }
**I wonder why it works ???? Really.. I don't know why it works... but it does**
-
Dialog Box errorHey again to all... I have a code that creates a dialog box... But this dialog box is useless cause it doesn't handle none of its messages... And when I call DefDlgProc there is an error when it tries to handle message #48 (I think) about a 1000 times. here is my code:
#include <windows.h>
#include "resource.h"bool g_run = true;
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
ShowWindow(hDlg,SW_SHOW);
return TRUE;case WM\_COMMAND: if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) { g\_run = false; EndDialog(hDlg, LOWORD(wParam)); return TRUE; } break;
/* default:
return DefDlgProc(hDlg,message,wParam,lParam);
break;
*/ }
return FALSE;
}int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, int nCmdShow)
{
HWND hwnd = CreateDialog(hInstance, (LPCTSTR)IDD_DIALOG1, NULL ,(DLGPROC)About);
if (hwnd == NULL)
{
DWORD err = GetLastError();
}while (g\_run); return 0;
};
-
Tray BarHi all, Can anyone please give a tip or 2 or 1000, about... How to put an icon in the tray bar ? woops... almost forgot, I m not using MFC.. only pure VC++
-
the SINUSHi all... (* long time no seen *) ;) For months and months I try to find out... What is the formula behind the sinus, because I want to do my own sinus function (Ex.
double MySin(double)
) Please heeelp me... Any kind of help will be greatly appreciated =-=-=-=-=-=-= The Server :rose: -
Opening 2 windows upon startupYes.. It took me some time, But finally I get it. Sorry to disapoint you, But I didn't work with MFC since 1999... It's about 4 years now. =-=-=-=-=-=- The-Server :rose:
-
Opening 2 windows upon startupI m very sorry... But I dont understand what you want to do. If you are talking about programming in VCPP. Please let me know what are you talking about, I m very intresting in your question... Because I just dont understand it. I have some question for you:
How many windows in total?
(include the main one)How many & what types if windows you have in total?
Also, How many times you need to call **RegisterClass(...)**
=-=-=-=-=-= The-Server :rose: -
Opening 2 windows upon startupHi... ----- If I understand your question (which I dont). If you want your app to be with multi windows. (*in you example 2 windows*) You can call twice "CreateWindow(...)"
but then you use the same winproc
or You can register 2 difrent classes for 2 diffrent window procs and call "CreateWindow(...)" twice also,but ONE for each registered class
=-=-=-=-=-= The-Server :rose: -
No Question... Just Testing The Length Of The Subject. No Question... Just Testing The Length Of The Subject. No Question... Just Testing The Length Of The Subject.No Question... Just Testing The Length Of The Subject.
-
JSP and TomcatOne more question, A litle less, but still importent: I have
linux mandrake
. and I need to install theJDK
so I downloaded the file:JDK_file.rpm.bin
And executed it from the using the linux command:. JDK_file.rpm.bin
After the extrection... I typed:ls
. and saw the list of files. 2 files were there:JDK_file.rpm.bin
and**install.something.1157**
How do I run the.something
file?? =-=-=-=-=-=-= The-Server :rose: -
JSP and Tomcat10x... I guess the
JAVA_HOME
environment variable was missing. cause after I added it, the Tomcat server start. ... Now, Only to create a database. And create a .jsp file that will connect to that database and generate an HTML. Tips about how to and/or where to start from... Will be mostly appricated. =-=-=-=-=-=-= The-Server :rose: -
JSP and TomcatHi all... I m very new in JSP and Tomcat and stuff, And I want to know where can I start from. I already have the apache in c:\apache. And already have the IIS from my WinXP installation. Anyways... I saw a document that said to download the JDK from: http://java.sun.com/j2se/1.3/download.html[^] And download the JSP enivorment(Tomcat) from: http://java.sun.com/products/jsp/download.html[^] So I did... I think I downloaded the JDK. (or was it the SDK?) I downloaded Tomcat 5 and extracted it to my c:\tomcat folder. Now: I open a cmd window... I goes to c:\tomcat\bin I run the startup file: startup.bat AND...:wtf: the cmd window closes... :confused: if anyone with expiriance is reading this message... Please, Tell me what do I need to do in order to make a simple jsp file that gets data from a database and displayes it as an HTML to the viewer??? :confused: =-=-=-=-=-= The-Server :rose:
-
A perl questionHi all... Does any1 know how can I create win32 window in perl