|
Guys,
I'm having a bunch of insertstatements that are generated by code like following:
INSERT INTO ACTION_SELF (ACTION_ID,ACTION,TELEPHONE,CURENT) VALUES ('MYINSTR4','ct: Sleep','011295670','T');
The four columns are from a mdb file and are defined as text.
I have tested with three tables from which this is the simplest of design and the other two insert fine!
moreover, this query succeeds if I open up Access and execute it there and also if I fire it to an oracle db via my code.
the error message says: "Syntax error in INSERT INTO statement."
Anybody any idea what's going wrong? I checked the column size, removed the ";", ..., but I can't find the error?
Many thanks!
V.
No hurries, no worries!
|
|
|
|
|
I think it's got something to do with data types, what are the data types of your columns??
|
|
|
|
|
System.String so it should be allright
|
|
|
|
|
I think he means the columns in the database
Arthur Dent - "That would explain it. All my life I've had this strange feeling that there's something big and sinister going on in the world."
Slartibartfast - "No. That's perfectly normal paranoia. Everybody in the universe gets that."
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
if so, he didn't read my post very well,
|
|
|
|
|
Hi,
hard to say. You could check two things:
1. Are you sure you mean CURENT and not CURRENT ?
2. Probably one of your column names is a special keyword. Try the following:
INSERT INTO ACTION_SELF ("ACTION_ID","ACTION","TELEPHONE","CURENT") VALUES ('MYINSTR4','ct: Sleep','011295670','T');
Robert
|
|
|
|
|
ACTION was a keyword. Stupid me, I already renamed the table to ACTION_SELF because I thought ACTIONS was a keyword, than I forget to check the columns...
thanks it works now...
|
|
|
|
|
Yes, ACTION is a reserved keyword in JET4 (OLEDB) and ODBC, but not in the database itself.
---
b { font-weight: normal; }
|
|
|
|
|
horrible, and I tried to do [TABLENAME].[ACTION], but I couldn't fool it like that .
I guess I'll just have to rename it .
Anyway, now I know what's going wrong .
|
|
|
|
|
Open the statement in Query Analyzer or whatever else you use.
Remove columns in the statement until you locate the problem item (you may have to let nulls be placed in field temporarily).
|
|
|
|
|
Hi all
I'm not able to use the ConfigurationManager class.
Each time I try to access to Application Settings I receive an exception.
In my App.config file I have
<!--General Settings--><br />
<appsettings><br />
<add key = "Author" value = "manustone" /><br />
</appsettings><br />
inside <configuration></configuration>.
I added a reference to System.Configuration.dll
When in my code i use
<br />
string strAuthor = ConfigurationManager.AppSettings["Author"];<br />
I've got an exception.
Do you know where is the problem?
Regards
Manu Stone
|
|
|
|
|
What's the exception...
I don't know if this solves your problem...
change appsettings to appSettings in your app.config
remove the spaces after the key and value attributes
<br />
<add key = "Author" value = "manustone" /><br />
to
<br />
<add key="Author" value="manustone" /><br />
The rest looks fine to me... it those steps above don't work, we might require the exception message thrown...
|
|
|
|
|
Hi
I changed it but the same error occurs.
The excetpion error message is
"Configuration system failed to initialize"
How to initialize a Configuration Manager?
|
|
|
|
|
Finally I found the problem!!!
There was a character written just above the section that was corrupting the file.
Thanks for your help.
Regards
ManuStone
|
|
|
|
|
Do you get this error : "Unrecognized configuration section appsettings" ? if you do then change appsettings to appSettings as advised earlier , otherwise supply us with the exception you are getting.
|
|
|
|
|
Hi all
the excetpion error message is
"Configuration system failed to initialize"
How to initialize a Configuration Manager?
|
|
|
|
|
Finally I found the problem!!!
There was a character written just above the section that was corrupting the file.
Thanks for your help.
Regards
ManuStone
|
|
|
|
|
Just a shot in the dark, rename appsettings to appSettings
|
|
|
|
|
Yes I agree!!!
Do you know if Do I need to do some settings in the Project Settings to activate this ConfigurationManager class?
|
|
|
|
|
Finally I found the problem!!!
There was a character written just above the section that was corrupting the file.
Thanks for your help.
Regards
ManuStone
|
|
|
|
|
hi
i want to pass some parameters to crystal reports but how to do that ?
i tried to pass parameters to Crystal reports by ParameterFields properties but it's could not pass my value to crystal reports fields.
please give me a tested example for vc# 2005 ..
thanks
|
|
|
|
|
frmMdiZNMS myform1;//frmMdiZNMS is the parent form
myform1 = (frmMdiZNMS)frmMdiZNMS.ActiveForm ;
if(myform1 != null)
{
//isSerialConnected is the serialport connection status
if(myform1.isSerialConnected==true)
{
//write is used to write the data through serial port using RS232 Application
myform1.serPort.Write(myform1.paninfo.ClearBindingRequest(srcaddress,destaddress));
myform1.paninfo.Events.Add(new Event(0,"Clear Binding table request sent.",(int)EVENT_TYPE.INFORMATION));
}
else
{
myform1.paninfo.Events.Add(new Event(0,SERIAL_NOT_CONNECTED,(int)EVENT_TYPE.CRITICAL));
return;
}
}
In this method every time myform1 should shows undefined value.
So I cant able to write the data in to the serial port.
Please do the needful
Thanks & Regards
AsGuru
|
|
|
|
|
Hello,
Do you mean the static property "System.Windows.Forms.Form.ActiveForm"?
Maybe this works:
frmMdiZNMS myform1 = (frmMdiZNMS)System.Windows.Forms.Form.ActiveForm;
or
frmMdiZNMS myform1 = System.Windows.Forms.Form.ActiveForm as frmMdiZNMS;
All the best,
Martin
|
|
|
|
|
I am using PrintPreviewDialog to preview the contents.While previewing,when i reach the first page or the last page then also the top arrow or the down arrow buttons(in side of current page number display) does not get disabled . How can i disable them in such a situation
Gaurav Rahi
|
|
|
|
|
Hi all
if i add the attribute SerializedExceptionExtension to mine web method will i still need to cast the exceptions thrown in SoapException.
Thanks in advance
|
|
|
|