Forums
This topic is locked
Ambigious Column Name
Posted 06 Jul 2007 13:15:51
1
has voted
06 Jul 2007 13:15:51 Matthew Cooper posted:
Morning, Ive got the above error, its because 2 fields im using are the same name, I dont want to change the coulmn names as I didnt code the SQL database, anyone got any ideas for a way around it, it's the Ind_Type_Id columns that cause the error, code below<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote><%
Dim rs_users
Dim rs_users_numRows
Set rs_users = Server.CreateObject("ADODB.Recordset"
rs_users.ActiveConnection = MM_Connection_STRING
rs_users.Source = "SELECT * FROM dbo.Site_Registration, dbo.Site_Indervidual_Status, dbo.Country_Lang, dbo.Site_Indervidual_Type WHERE Ind_Status = Status_id AND Ind_Country = Country_Id AND Lang_Id = 1 AND Ind_Type_Id = Ind_Type_Id AND Ind_Status = " + Replace(rs_users__MMColParam, "'", "''" + ""
rs_users.CursorType = 0
rs_users.CursorLocation = 2
rs_users.LockType = 1
rs_users.Open()
rs_users_numRows = 0
%> <hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Edited by - dhmcooper on 06 Jul 2007 13:17:15
Replies
Replied 06 Jul 2007 15:20:33
06 Jul 2007 15:20:33 Matthew Cooper replied:
Sorted the problem, just had to include the table before the column name to ditinguish the 2 from each other