Hi I have the below code and when i open it in I.E i get this error

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'Language'.

Do i need to enter a database @ the datasource=

<!--- GetLanguage --->
<cfquery name="qLanguage" datasource="#request.DSN#">
Select LanguageID, LanguageCode, LanguageName from Language
</cfquery>

<!--- GetVersion --->
<cfquery name="qVersion" datasource="#request.DSN#">
Select VersionID, VersionName from Version
</cfquery>

<!--- GetTimeZone --->
<cfquery name="qTimeZone" datasource="#request.DSN#">
Select TimeZoneID, TimeZone from TimeZone
</cfquery>

<!--- GetType --->
<cfquery name="qType" datasource="#request.DSN#">
Select TypeID, Type from Type
</cfquery>

<!--- GetType --->
<cfquery name="qClientType" datasource="#request.DSN#">
Select ClientTypeID, ClientType from ClientType
</cfquery>

<!--- This Script Checks that the two password match and if they don't it returns user to complete again --->
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function checkPw(form) {
password = document.NewUser.Password.value;
password2 = document.NewUser.ConfirmPassword.value;

if (password != password2) {
alert ("\nThe passwords you entered do not match. Please re-enter your password.")
document.NewUser.Password.value="";
document.NewUser.ConfirmPassword.value="";
document.NewUser.Password.focus();
return false;
}
}
// End -->
</script>




<table width="350" border="0" align="center" cellpadding="10" cellspacing="5" bgcolor="#FFFFFF">

<tr>
<td width="50%" valign="top" bgcolor="#EFEFEF" class="TableTxt">

<cfform action="insert-user.cfm" method="post" enctype="application/x-www-form-urlencoded" name="NewUser" preloader="no" format="html">
<table align="center">

<tr>
<td nowrap="nowrap" class="FormTitleTxt">Display Name: </td>
<td class="FormTitleTxt"><cfinput name="Alias" type="text" value="" required="yes" class="FormTxt" message="Please enter a Display Name"></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt">Password:</td>
<td class="FormTitleTxt"><cfinput type="password" name="Password" required="yes" class="FormTxt" value="" message="Please enter a password" validate="noblanks"></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt">Confirm Password:</td>
<td class="FormTitleTxt"><cfinput type="password" name="ConfirmPassword" required="yes" class="FormTxt" value="" message="Please confirm your password"></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt">Email:</td>
<td class="FormTitleTxt"><cfinput type="text" name="Email" required="yes" class="FormTxt" value="" message="Please enter a valid email address" validate="email"></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt">Language:</td>
<td class="FormTitleTxt"><cfselect name="LanguageID" class="FormTxt" query="qLanguage" value="LanguageID" display="LanguageName" selected="19"></cfselect></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt">Operating System:</td>
<td class="FormTitleTxt"><cfselect name="VersionID" class="FormTxt" query="qVersion" value="VersionID" display="VersionName" selected="2"></cfselect></td>
</tr>
<tr>
<td nowrap="nowrap" class="FormTitleTxt"></td>
<td class="FormTitleTxt" align="right"><cfinput type="submit" name="Save" class="FormTxt" onClick="return checkPw(this)" value="Sign Up"></td>
</tr>
</table>

</cfform>

</td>
</tr>
</table>

Mnay thanks Lee

The error message is pretty clear. The db can't find the object (ie Table) "Language". Run the query against directly against your db in MS SQL. Does it work?

Ok i see, Sorry i'am new to CF

Now i get this message [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'LanguageID'. any ideas?

many thanks

Lee

Ok i see, Sorry i'am new to CF

Now i get this message [Macromedia][SQLServer JDBC Driver][SQLServer]Invalid column name 'LanguageID'. any ideas?

many thanks

Lee

It's pretty much the same thing. Cfquery is finding the table now, but the column name is invalid. Check to be sure that the column name is correct.

Also, I was asking about what happens when you run the SQL directly in your db, *not* using cfquery. Using your IDE (Management Studio, etc..) you can easily view what tables and column exist.

hi, Yes come columns dont exist in my database, But when i enter this one Version i get the below error. :-(

Error Executing Database Query.
[Macromedia][SQLServer JDBC Driver][SQLServer]Invalid object name 'Version'.

Many thanks for you help ... Lee

i have sorted it

For future readers, "how" did you solve it? Was it a reserved word problem?

the Version table did not exist in my ms sql database.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.