|
hello friend,
plz tell what is the syntax error in belows access query.pdpstate is the name of table
INSERT INTO pdpstate(setid,power,input,aspect,ontimer,offtimer,multiscreen,
volume,mute,balance,treble,bass,brightness,contrast,tint,red,green,blue,frequency,phase,
hposition,vposition,displayflag,ontimehour,ontimemin,ontimeampm,ontimeonoff,ontimevolume,
offtimehour,offtimemin,offtimeampm,offtimeonoff,failcount,sharpness,color,rgb_contrast,
rgb_brightness,pip_onoff,pip_aspect,pip_source,ontimesource,service5v,service12v_main,
service12v_audio,servicelamp_time1,servicelamp_time2,servicelamp_time3,servicelamp_status,
rgb_sharpness,rgb_colortemp,shiftonoff,h_dot,v_line,shifttime,wiper,allwhite,videowall,
timedisplay,eq100hz,eq300hz,eq1khz,eq3khz,eq10khz,bbe,max_hour,max_min,max_ampm,max_value,
min_hour,min_min,min_ampm,min_value,autolamp,scroll_period,scroll_time,colortone,comport,
vwallmode,scroll_type,tv_select,wall_div,wall_sno,rgb_colortone,lamp_error,temperature,
br_sensor,no_sync,current_temp,fan_error,tv_ mode,major_ch1,major_ch2,sel_minor,
minor_ch1,minor_ch2)VALUES('0','1','30','16','1','1','10','80','0','50','10','60','20','0','30',
'26','88','29','40','20','1','1','0','2','9','0','1','5','10','7','0','0','0','76','0','20','20',
'1','0','20','33','1','1','1','1','1','1','1','2','2','1','1','1','1','1','1','1','1','1','10','1',
'1','1','1','63','255','1','100','63','255','1','255','70','1','1','2','1','1','6','1','36','3','1',
'0','0','0','1','44','0','20','4','50','20','10','5')
regards
jitu
|
|
|
|
|
You're kidding, right? Anyways, this[^] section might be more suited for these kinds of questions...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Sometimes you just have to hate coding to do it well. <
|
|
|
|
|
Beware: you're just one step away from Liquid Nitrogen.
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]
|
|
|
|
|
Start with this:
INSERT INTO pdpstate(setid)VALUES('0')
If that works, add another field/value pair. Continue until syntax error appears.
"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 an application that uses on document structure, am converting to to MDI from SDI. I've got that part handled except for child windows. I want to create a child window for different instances of the application, like add order, add location, add machine, etc... How could I go about creating different child windows that could be open at the same time as the other ones?
|
|
|
|
|
|
Cipher 22 wrote: I want to create a child window for different instances of the application...
Really?
"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 has been created one login.aspzx page and one master.aspx page
when i login ,i m directly redirect to master page.master page contain logout button(linkbutten).
when clicked on logout button,the page has redirect to login page.
My problem is that,in that (after i clicked the logout button)when i clicked the "Back" it will move to master page.
i want clear the session?????
login.aspx page :
protected void buttonLogin_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(TextBox1.Text))
{ //Focus box before showing a message
// textBoxUsername.Focus();
TextBox1.Focus();
//MessageBox.Show("Enter your username", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Enter your username');</script>");
//Focus again afterwards, sometimes people double click message boxes and select another control accidentally
TextBox1.Focus();
// textBoxUsername.Focus();
return;
}
else if (string.IsNullOrEmpty(TextBox2.Text))
{
// textBoxPassword.Focus();
TextBox2.Focus();
// MessageBox.Show("Enter your password", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Enter your password');</script>");
TextBox2.Focus();
// textBoxPassword.Focus();
return;
}
using (DataTable dt = LookupUser(TextBox1.Text))
{
if (dt.Rows.Count == 0)
{
TextBox1.Focus();
// MessageBox.Show("Invalid username.", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
Response.Write("<script> alert('Invalid username.');</script>");
TextBox1.Focus();
return;
}
else
{
//Always compare the resulting crypto string or hash value, never the decrypted value
//By doing that you never make a call to Decrypt() and the application is harder to
//reverse engineer. I included the Decrypt() method here for informational purposes
//only. I do not recommend shipping an assembly with Decrypt() methods.
string dbPassword = Convert.ToString(dt.Rows[0]["Password"])…
string appPassword = (TextBox2.Text);
//we store the password as encrypted in the DB
if (string.Compare(dbPassword, appPassword) == 0)
{
Session.Add("islogin", true);
Response.Redirect("Firstmain.aspx");
}
else
{
//You may want to use the same error message so they can't tell which field they got wrong
TextBox2.Focus();
// MessageBox.Show("Invalid Password", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Information);
Response.Write("<script> alert('Invalid Password');</script>");
TextBox2.Focus();
return;
}
}
}
}
master page :
protected void Page_Load(object sender, EventArgs e)
{
lblTime.Text = DateTime.Now.ToLongDateString();
if ((Session["islogin"] == null) || (Session["islogin"] == ""))
{
Response.Redirect("frmLogin.aspx");
}
}
//protected void LoginStatus1_LoggingOut(object sender, LoginCancelEventArgs e)
//{
// Response.Write("LoggingOut event. Don't go away now.");
// e.Cancel = true;
//}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Session.Remove("islogin");
Session.Clear();
Response.Redirect("frmlogin.aspx");
}
send mi solution as soon as possible
|
|
|
|
|
Wrong forum.
Try the ASP.Net forum[^].
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi
How to read text from image file ..?? please share with me ...
regards
~~~~~~~~~~~~~Raju~~~~~~~~~~~~~
|
|
|
|
|
An image file is a binary file.
You can use CreateFile[^]/ReadFile[^] APIs to read the contents of the file.
Or you can use the C runtime functions fopen[^]/fread[^].
Give fopen("file", "rb"); to open the file in binary mode for reading.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
What do you mean exactly by that ? Do you mean that you have an image with some text on it and you would like your program to be able to read it ? Well, that's certainly not a trivial task at all. You'll need to look for OCR (optical character recognition), you will eventually find some library (perhaps free).
|
|
|
|
|
I have a whole bunch of coclasses and corresponding interfaces.
I want to get an interface, IA, say:
IA* pIA;
CComPtr<IUnknown> pIUnknown;
pIUnknown.CoCreateInstance(__uuidof(A));
pIUnknown->QueryInterface(__uuidof(IA), (LPVOID*)&pIA);
But I also have coclass B and interface IB.
When I run this piece of code, __uuidof(A) is definitely getting the CLSID of A and not B (I've chased it down as far as I can go):
__checkReturn HRESULT CoCreateInstance(__in REFCLSID rclsid, __in_opt LPUNKNOWN pUnkOuter = NULL, __in DWORD dwClsContext = CLSCTX_ALL) throw()
{
ATLASSERT(p == NULL);
return ::CoCreateInstance(rclsid, pUnkOuter, dwClsContext, __uuidof(T), (void**)&p);
}
But, "p" in the above code points to B and no to A, despite rclsid clearly showing CLSID of A.
I've gone through my code several times checking order of things being declared, variables not getting cleared when reused, GUIDs getting mixed up etc. None of these seem to be the problem. In fact, CoCreateInstance to this coclass works fine in other parts of the program. It just fails in this particular instance.
Any ideas how to approach this problem?
Please help!
|
|
|
|
|
Does A also expose interface IB? If so, then that's entirely understandable - you expose two interfaces, each derived from IUnknown. The vtable layout of IA will have the methods of IUnknown immediately before the methods of IA (presuming IA derives directly from IUnknown), and the vtable layout of IB will have the methods of IUnknown immediately before the methods of IB (again presuming IB derives directly from IUnknown).
What's going to happen when you have A deriving from IA AND IB? Well, it concatenates their vtables, so that they both have an IUnknown vtable immediately preceding their own methods, preserving the layout you'd see for any one of the interfaces. So, when you ask for an IUnknown interface pointer, it has to pick one of them, so an IUnknown pointer will point at either an IA or IB interface - it doesn't really matter.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Thanks for the idea, but no, A doesn't expose IB.
|
|
|
|
|
Ummm - one other thought - why bother with all that explicit IUnknown stuff? You could do this:
CComPtr<IA> pA;
pA.CoCreateInstance(__uuidof(IA));
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi, I was wondering if someone could look at this code and tell me what I have done wrong. I have been trying to create a Win32 client but I get build errors. Thanks
<br />
#include <windows.h><br />
<br />
#define WINDOW_WIDTH 980<br />
#define WINDOW_HEIGHT 750<br />
<br />
const char lpClassName[] = "MyProject";<br />
HWND mainWindow<br />
<br />
LRESULT CALLBACK WindowEvent(HWND, UINT message, WPARAM wParam, LPARAM, lParam);<br />
<br />
int WINAPI WinMain(HINSTANCE, hInstance, HINSTANCE, hPrevInstance, LPSTR lpCmdLine, int nShowCmd<br />
<br />
{<br />
WNDCLASSEX wc;<br />
wc.style = CS_VREDRAW | CS_HREDRAW;<br />
wc.lpszMenuName = NULL;<br />
wc.lpfnWndProc = WindowEvent;<br />
wc.hInstance = hInstance;<br />
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);<br />
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);<br />
wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);<br />
wc.cbWndExtra = 0;<br />
wc.cbSize = sizeof(wc);<br />
wc.cbClsExtra = 0;<br />
<br />
RegisterClassEx(&wc);<br />
<br />
mainWindow = CreateWindowEx(<br />
NULL,<br />
lpClassName,<br />
"MyProject",<br />
WS_OVERLAPPEDWINDOW | WS_VISIBLE, <br />
(GetSystemMetrics(SM_CXSCREEN) / 2 - (WINDOW_WIDTH / 2),<br />
(GetSystemMetrics(SM_CYSCREEN) / 2 - (WINDOW_HEIGHT / 2),<br />
WINDOW_WIDTH,<br />
WINDOW_HEIGHT<br />
NULL,<br />
NULL,<br />
hInstance,<br />
NULL<br />
);<br />
<br />
if (!mainWindow)<br />
return 0;<br />
<br />
UpdateWindow(mainWindow);<br />
<br />
MSG msg;<br />
while (1)<br />
{<br />
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))<br />
{<br />
if (msg.message == WM_QUIT)<br />
{<br />
TranslateMessage(&msg);<br />
DispatchMessage(&msg);<br />
}<br />
<br />
return (int) msg.wParam;<br />
}<br />
<br />
LRESULT CALLBACK WindowEvent(HWND, UINT message, WPARAM wParam, LPARAM, lParam);<br />
{<br />
switch (message)<br />
{<br />
case WM_DESTROY:<br />
PostQuitMessage(0);<br />
return 0;<br />
break;<br />
}<br />
<br />
return DefWindowProc(hWnd, message, wParam, lParam);<br />
}<br />
Andrew McIntyre
|
|
|
|
|
What 'build errors' did you get (i.e. Please be specific)?
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]
|
|
|
|
|
MrMcIntyre wrote: tell me what I have done wrong.
Quite a lot! If you had read the messages produced by the compiler it would have pointed you to the missing semi-colons, additional commas etc. It took me about five goes to get a clean compile but there is still a bug in there. Might I suggest you start with a sample program produced by the Visual Studio wizard, in order to see the stages of a basic windows program.
|
|
|
|
|
Hope not telling about the syntax errors, which is there in your code.
Величие не Бога может быть недооценена.
modified on Tuesday, September 15, 2009 5:08 AM
|
|
|
|
|
|
I just tried your code snippet on a modified c:\boot.ini file and it read fine. The tab character was in pBuf .
"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 all
i am new member of this forum.I need some help for Get Active window name.Can any one give me API or function name?
Thank in advance.
|
|
|
|
|
|
Hi
I want to set the background of a static control to transparent. How to do this?
I tried the methode described in MSDN ( using the ON_WM_CTLCOLOR() and ON_WM_ERASEBKGND() ) but not working.
My intention is to set the background to a blue gradient or just a solid fill. I have lot of static controls and check boxes in my dialog. I mangaed to set the background of my dialog to solid blue with the help of MSDN documentation. But static control background becomes white whatever i do according to the documentation. Compailer complainted that m_brush is not declaired. I declaired it as CBrush m_brush; in .h file. I have not initialized and not sure how to initialise it.
Am i doing something wrong? Please help. Below is what I got from the MSDN (FYR)
HBRUSH CTestDlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if (pWnd->GetDlgCtrlID() == IDC_MYSTATIC)
{
pDC->SetTextColor(RGB(255, 0, 0));
pDC->SetBkMode(TRANSPARENT);
hbr = m_brush;
}
return hbr;
}
BOOL CTestDlg::OnEraseBkgnd(CDC* pDC)
{
CBrush backBrush(RGB(255, 128, 128));
CBrush* pOldBrush = pDC->SelectObject(&backBrush);
CRect rect;
pDC->GetClipBox(&rect);
pDC->PatBlt(rect.left, rect.top, rect.Width(), rect.Height(),
PATCOPY);
pDC->SelectObject(pOldBrush);
return TRUE;
}
|
|
|
|
|