473,386 Members | 1,943 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,386 software developers and data experts.

column qualifier or table undefined

I'm getting this error column qualifier or table undefined in asp.net

Dim connectionstring As String

connectionstring = "DRIVER=Client Access ODBC Driver (32-bit);UID=ODBC;PWD=GOCATS;System=143.42.191.135"

Dim Order As Integer
Order = CInt(txtOrderNumber.Text)
Dim myConnection As New Data.Odbc.OdbcConnection(connectionstring)
Dim mysql1 As String = "select rmsfiles2.obcop200.line#, rmsfiles2.mspmp100.ptyp1, rmsfiles2.mspmp100.ptyp2, rmsfiles2.obcop200.quano, rmsfiles2.obcop200.quana, rmsfiles2.obcop200.quans, rmsfiles2.obcop200.c2rdt, rmsfiles2.mspmp100.prdno, rmsfiles2.obcop200.unitm, rmsfiles2.mspmp100.descp, rmsfiles2.obcop200.actsp, rmsfiles2.obcop200.ordno from rmsfiles2.obcop200 inner join rmsfiles.mspmp100 on rmsfiles2.obcop200.prdno = rmsfiles2.mspmp100.prdno where ordno = " & Order.ToString()
Dim command As New Data.Odbc.OdbcCommand(mysql1)
command.Connection = myConnection
Dim adapter As OdbcDataAdapter = New OdbcDataAdapter(command)
myConnection.Open()

adapter.SelectCommand = New OdbcCommand("select rmsfiles2.obcop200.line#, rmsfiles2.mspmp100.ptyp1, rmsfiles2.mspmp100.ptyp2, rmsfiles2.obcop200.quano, rmsfiles2.obcop200.quana, rmsfiles2.obcop200.quans, rmsfiles2.obcop200.c2rdt, rmsfiles2.mspmp100.prdno, rmsfiles2.obcop200.unitm, rmsfiles2.mspmp100.descp, rmsfiles2.obcop200.actsp, rmsfiles2.obcop200.ordno from rmsfiles2.obcop200 inner join rmsfiles.mspmp100 on rmsfiles2.obcop200.prdno = rmsfiles2.mspmp100.prdno where ordno = " & Order.ToString(), myConnection)
'select rmsfiles2.obcop200.line#, cast(rmsfiles2.obcop200.quano as decimal(7,0))as ""Qty Ord"", rmsfiles2.obcop200.quana as ""Qty Aloc"", cast(rmsfiles2.obcop200.quans as decimal(7,0))as ""Qty Ship"", cast(rmsfiles2.obcop200.c2rdt as char(14))as ""Shipped Date"", rmsfiles2.obcop200.unitm as ""U/M"", cast(rmsfiles2.obcop200.actsp as decimal(7,2)) as ""Price"", rmsfiles2.obcop200.ordno as ""Factory Number"", rmsfiles2.obcop200.prdno from rmsfiles2.obcop200 where ordno = " & Order.ToString(), myConnection)


Dim ds As DataSet = New DataSet()
adapter.Fill(ds, "RMSFILES2.OBCOP200_and_RMSFILES2.MSPMP100")
' adapter.SelectCommand = New OdbcCommand("select rmsfiles2.mspmp100.ptyp1 as ""R/N"", rmsfiles2.mspmp100.ptyp2 as ""S/D"", rmsfiles2.mspmp100.descp as ""Description"", rmsfiles2.mspmp100.prdno from rmsfiles2.obcop200 inner join rmsfiles2.mspmp100 on rmsfiles2.obcop200.prdno = rmsfiles2.mspmp100.prdno where rmsfiles2.obcop200.ordno = " & Order.ToString(), myConnection)
' adapter.Fill(ds, "MSPMP100")

ds.Tables(0).TableName = "RMSFILES2.OBCOP200"
ds.Tables(1).TableName = "RMSFILES2.MSPMP100"
ds.Relations.Add("rmsfiles2.OBCOP200", ds.Tables("rmsfiles2.OBCOP200").Columns("prdno"), ds.Tables("rmsfiles2.MSPMP100").Columns("prdno"), True)


gridview1.DataSource = ds.Tables("RMSFILES2.OBCOP200")
' gridview1.DataSource = ds.Tables("MSPMP100")
gridview1.DataBind()
If ds.Tables(0).Rows.Count = 0 Then
lbl_error.Visible = True
gridview1.Visible = False
Else
lbl_error.Visible = False
gridview1.Visible = True
End If

If ds.Tables(1).Rows.Count = 0 Then
lbl_error.Visible = True
gridview1.Visible = False
Else
lbl_error.Visible = False
gridview1.Visible = True
End If

adapter.Dispose()
adapter = Nothing
myConnection.Close()
Oct 1 '07 #1
2 4029
Plater
7,872 Expert 4TB
That sounds like there is a typo in your SQL query.
Use the debugger to step through so you can see the exact output value of your query.

It's probably something like not having ( or ) in the right place for those inner joins
Oct 1 '07 #2
That sounds like there is a typo in your SQL query.
Use the debugger to step through so you can see the exact output value of your query.

It's probably something like not having ( or ) in the right place for those inner joins
ok i did and it worked
Oct 1 '07 #3

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

Similar topics

2
by: Jim Wilson | last post by:
As far as I can tell, there isn't a way to get postgresql to accept column qualifiers (e.g. tablenames). A 'parse error at or near "."' gets returned. I'm using a closed source application that...
4
by: Trevor Davies | last post by:
We have databases on an RS/6000 which we would like to try moving to AS/400. On the AIX box we create a number of databases (Dev, Sys Test etc) and within each database there are a number of...
2
by: kc68 | last post by:
I'm trying to import a csv spreadsheet into Access and find that the data in some cells in a few rows gets pushed to columns to the right. When I reach the point in the Wizard that shows the column...
1
by: Jimmy Stewart | last post by:
I have a continuous form has an unbound field named "Client". Its controlsource is " =.(1) " This allows me to display the client name without the combo box dropdown arrow. I want users to be able...
5
by: Anne | last post by:
Hello! Here is the statement in question: --STATEMENT A SELECT * FROM dbo.myTable WHERE colX in (SELECT colX FROM dbo.sourceTable) The problem with Statement A is that 'colX' does not exist...
5
by: Rahul Babbar | last post by:
Hi, I am facing an issue here. I had to drop a number of columns (around 20) from a table, which I tried to do all at the same time using the following command. Alter table table_name drop...
7
by: lenygold via DBMonster.com | last post by:
I have a table FAMILY folowing columns: SSN,NAME,DOB,AGE,PL_BIRTH,MARITAL_STAT I would like to add a column GENDER between columns NAME and DOB. Is posiible wihout Droping table FAMILY? ...
3
by: Csaba Gabor | last post by:
I have a table with 3 rows, and two pieces of data to display in each row. However, the first element of the last two rows and the 2nd element of the 1st row are very short. This would seem to...
4
by: Tony Mountifield | last post by:
I have a table with an Id column as the primary key, and a number of other tables that have a foreign key pointing to the first table. I'm looking for the most efficient/elegant/succinct way to...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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:
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...

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.