473,513 Members | 2,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

when i select a 26 digits ,the sql doesn't work ,why?

2 New Member
userID='00100001820060623113147552538560385152'
sql='select * from usagestatistics where userID='+'\''+userID+'\''

this command couldn't work.
the error is:
Traceback (most recent call last):
File "userage.py", line 13, in ?
rs.Open('['+sql+']',conn,1,3) #1和3是常数.代表adOpenKeyset 和adLockOptimistadLockOptimistic
File "<COMObject ADODB.Recordset>", line 4, in Open
pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Microsoft JET Database Engine', "Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.", None, 5003129, -2147217900), None)


but if the userID is '7552538560385152' ,my program works successfully

do you know why?
Sep 1 '06 #1
0 1345

Sign in to post your reply or Sign up for a free account.

Similar topics

2
4062
by: Lukas Bradley | last post by:
Using MySQL 4.0.12, is there a way to specify significant digits for a mathematical operation within a SELECT? In other words, the query "select 5/213" defaults to two significant digits (0.02)...
2
3335
by: Ingo Nolden | last post by:
Hello, I want to format floats ( doubles ) into small strings of 7 characters. I tried to use std::ostream, but I don't get the desired behaviour. Especially in scientific notation I am not...
6
1899
by: BlueDragon | last post by:
Grrr! I'm trying to run a script: print 'Declaring cursor' declare cInv cursor forward_only static for select distinct inv.company, inv.contact, inv.address1, inv.city,
4
9536
by: Nicolae Fieraru | last post by:
Hi All, I have some javascript code and I try to filter out any characters (which are not digits or delete) from an input element in a form. Here is the code: <!DOCTYPE HTML PUBLIC...
3
8623
by: James Foreman | last post by:
I'm using DB2 UDB 8.1.2 on Suse linux. Try this: CREATE TABLE testsums (cost_of_sale decimal(7,2), price decimal(9, 2)); INSERT INTO testsums VALUES (10000, 30000); SELECT cost_of_sale/price...
3
2153
by: bughunter | last post by:
I discover next problem I have view definition with rank() create view vTEST as select c1, c2, c3, ... -- problem area start , rank() over (order by c3) as RNK -- problem area stop from...
1
1694
by: jinling | last post by:
userID='00100001820060623113147552538560385152' sql='select * from usagestatistics where userID='+'\''+userID+'\'' this command couldn't work. the error is: Traceback (most recent call last): ...
109
7520
by: jmcgill | last post by:
Hello. Is there a method for computing the number of digits, in a given numeric base, of N factorial, without actually computing the factorial? For example, 8! has 5 digits in base 10; 10! has...
15
3295
by: Simon Gare | last post by:
Hi, trying to retrieve postal codes from the db but only want the query to look at the first 3 digits of the code tried using (LEFT(dbo.booking_form.COLL_POST_CODE),3) but that doesn't work. I...
1
7078
by: =?ISO-8859-1?Q?Lasse_V=E5gs=E6ther_Karlsen?= | last post by:
I get the above error in some of the ASP.NET web applications on a server, and I need some help figuring out how to deal with it. This is a rather long post, and I hope I have enough details that...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5089
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3234
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
802
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.