the error come out at the bold section... pls help to check my algorithm ...thanks
Dim qryTake, rsTake
dim qryCbomFiltered, rsFiltered
qryChange = "SELECT PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime from cbomnew where comCode= 'PCEC' || comCode='LOX'||comCode='CCEC' "
Set rsTake= conn.Execute(qryChange)
qryCbomFiltered = "select PartNumber , SupplierName from cbom_Filtered"
set rsFiltered = conn.Execute(qryCbomFiltered)
if not rstake.eof then
while not rsTake.eof
while not rsFiltered.eof
if rsTake.Fields("PartNumber") = rsFiltered.Fields("PartNumber")
then
found true
else rsFiltered.movenext
end if
wend
rsTake.movenext
wend
If found = True Then
response.write(" data exist")
Else
Dim qryinsert, rsinsert
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Set rsinsert = conn.execute(qryinsert)
End if
end if
3 1113
Hi,
What are you getting at the Insert statement?
Does all the fields in the insert query conatin numeric values?
If not try including them within quotes.
e.g. '"&rsTake.Fields("SupplierName")&"'.
You can also debug the it by just Response.write(qryisert)
the error come out at the bold section... pls help to check my algorithm ...thanks
Dim qryTake, rsTake
dim qryCbomFiltered, rsFiltered
qryChange = "SELECT PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime from cbomnew where comCode= 'PCEC' || comCode='LOX'||comCode='CCEC' "
Set rsTake= conn.Execute(qryChange)
qryCbomFiltered = "select PartNumber , SupplierName from cbom_Filtered"
set rsFiltered = conn.Execute(qryCbomFiltered)
if not rstake.eof then
while not rsTake.eof
while not rsFiltered.eof
if rsTake.Fields("PartNumber") = rsFiltered.Fields("PartNumber")
then
found true
else rsFiltered.movenext
end if
wend
rsTake.movenext
wend
If found = True Then
response.write(" data exist")
Else
Dim qryinsert, rsinsert
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Set rsinsert = conn.execute(qryinsert)
End if
end if
Hi,
What are you getting at the Insert statement?
Does all the fields in the insert query conatin numeric values?
If not try including them within quotes.
e.g. '"&rsTake.Fields("SupplierName")&"'.
You can also debug the it by just Response.write(qryisert)
the insert values are integer and varchar.. it cannot be
'"&rsTake.Fields("SupplierName")&"' because i will insert only those value which are not in the cbomnew table... i need to compare it with cbom_filtered..
if not found true...( mean no value similiar.. then only i add)
i need to add that exact value which found none in the cbomnew table..
so,,, the exace value is this below..but it has error.. is my algorithm correct??? tthanks
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Hi,
Code is looking to be right. But can you please specify which error you are getting? Also if rsTake contains both numeric and varchar value it should be in quotes.There may be you are getting ,Syntax error.
the insert values are integer and varchar.. it cannot be
'"&rsTake.Fields("SupplierName")&"' because i will insert only those value which are not in the cbomnew table... i need to compare it with cbom_filtered..
if not found true...( mean no value similiar.. then only i add)
i need to add that exact value which found none in the cbomnew table..
so,,, the exace value is this below..but it has error.. is my algorithm correct??? tthanks
qryisert = "INSERT INTO cbom_filtered(PartNumber,PartDesc, comCode, MPN,QMPN,AML, SupplierName, LeadTime ) values ("&rsTake.Fields("PartNumber")&", "&rsTake.Fields("PartDesc")&", "&rsTake.Fields("comCode")&","&rsTake.Fields("MPN" )&","&rsTake.Fields("QMPN")&", "&rsTake.Fields("AML")&","&rsTake.Fields("Supplier Name")&","&rsTake.Fields("LeadTime")&")"
Sign in to post your reply or Sign up for a free account.
Similar topics
by: mike420 |
last post by:
I think everyone who used Python will agree that its syntax is
the best thing going for it. It is very readable and easy
for everyone to learn....
|
by: Andrew Koenig |
last post by:
PEP 315 suggests that a statement such as
do:
x = foo()
while x != 0:
bar(x)
be equivalent to
while True:
|
by: David MacQuigg |
last post by:
Seems like we need a simple way to extend Python syntax that doesn't
break existing syntax or clash with any other syntax in Python, is
easy to...
|
by: deko |
last post by:
I'm trying to log error messages and sometimes (no telling when or where)
the message contains a string with double quotes. Is there a way get the...
|
by: Keith H Duggar |
last post by:
Can anyone point me to the origin and history of the dot
syntax for accessing structures?
Were there languages prior to C that used it?
Who...
|
by: huey_jiang |
last post by:
Hi All,
I am trying to figure out a right syntax to convert an integer array
into hex array. sprintf worked for me on doing single integer:
...
|
by: martinharvey via DotNetMonster.com |
last post by:
I would be very grateful if someone could help me with a stored procedure
syntax problem
I want to insert the value "OrderTotal" into...
|
by: Superman859 |
last post by:
Hello everyone. Heads up - c++ syntax is killing me. I do quite well
in creating a Java program with very few syntax errors, but I get them
all...
|
by: HalfCoded |
last post by:
Hi everyone,
I am currently working at learning perl but come up with two problems i can't clear on my own.
I use perl version 5.8 on windows...
|
by: bearophileHUGS |
last post by:
I have just re-read the list of changes in Python 2.6, it's huge,
there are tons of changes and improvements, I'm really impressed:...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: Arjunsri |
last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
|
by: Matthew3360 |
last post by:
Hi,
I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
| |