473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Re: The Select statement includes a reserved word or an argument name that is misspel

I am using vb.net 2005 and access in back end.
my code is :
[Sub fillreport(ByVal p As String)
Dim ocon As New OleDb.OleDbConnection
Dim cmd As New OleDb.OleDbCommand
Dim da As New OleDb.OleDbDataAdapter
Dim dt As New DataTable

ocon.ConnectionString = constring

Try
ocon.Open()
cmd.CommandText = "select rpt_custpur.pur_id as purid,rpt_custpur.pur_date as purdat,rpt_custpur.pur_product_id as purproductid,rpt_custpur.pur_product_quantity as pur_product_quantity,rpt_custpur.pur_from as purfrm,rpt_custpur.pur_bil_no as purbilno,rpt_custpur.enter_by as enterby,rpt_custpur.pur_rate as purrate where rpt_custpur.pur_from like '" & cbo_pur.Text & "%'"
cmd.Connection = ocon
da.SelectCommand = cmd
da.Fill(dt)

cryrpt.Load("c:\BIFT\BIFT\rpt_custpur.rpt")
cryrpt.SetDataSource(dt)
CrystalReportViewer1.ReportSource = cryrpt

Catch ex As Exception
MessageBox.Show(ex.Message, "Report could not be created", MessageBoxButtons.OK, MessageBoxIcon.Error)

End Try


End Sub]
Dec 17 '11 #1
1 1544
Rabbit
12,516 Expert Mod 8TB
I see no from clause in your select statement.
Dec 18 '11 #2

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

Similar topics

6
by: Oli | last post by:
Hi In my company one of the people who works for me has done this: sqlText = "SELECT products.ProdID, productName, " _ & "productPrice, quantity from products, " _ & "itemsOrdered where " _...
0
by: Tinku | last post by:
Hi All We are migrating one of our application from Informix to Oracle. Now one of our tables contains a column named "MODE" which is a reserved word. I could create the table with this name...
2
by: Jessard | last post by:
Hi All, I am writing a .NET app that accesses an access View. The view has a table column called 'Position'. When i try and right an UpdateCommand string for this using this column I am...
1
by: James Boulter | last post by:
Dear all, I have a database in which one column is titled 'force'. Now that this has become a reserved word, virtually no commands will execute, including of course a query to change the column...
1
by: George o | last post by:
Ok, I inherited this database and there is a field that stopres a select statement. Is there anyway possible to execute the value of the field within a select statement? For example: the...
3
by: elubin_nospam | last post by:
Given these two tables in DB/2: Date Activity ------------------- -------- 2005-01-02 00:00:00 1 2005-01-05 00:00:00 2 2005-01-05 00:00:01 1 2005-01-07 00:00:00 2...
17
by: Benoit Martin | last post by:
I'm working on a project in VB.net connecting to a SQL Server 2000 database that I can't modify I created a dataset with a schema identical to the DB. When trying to update the DB from the dataset...
2
by: Miro | last post by:
I created a field in a db called "Password" If i do that, the Update row command throws an exception error. If I call the field PWord then it works great. Is this a reserved word for an...
3
by: Robert | last post by:
I ask because, in Access help, it does not list is as such, however, I had a table with a field named 'Name'. If I put a control on a form and used this as the control source no problems, but if I...
8
by: globalrev | last post by:
class Foo(object): def Hello(self): print "hi" object is purple, ie some sort of reserved word. why is self in black(ie a normal word) when it has special powers. replacing it with sel for...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.