>>lnHandle = sqlconnect("trpSurvey") >> >>text to lcSQL textmerge noshow pretext 15 >> select * >> from userValidation >>endtext >> >>if sqlexec(m.lnHandle,lcSQL,"crsImport",aCountInfo) < 0 >> aerror(laError) >> messagebox(laError[1,2]) >>endif >> >>sqldisconnect(m.lnHandle) >>select crsImport >>browse>>But I get an error that says userValidation is an invalid object name. It IS the name of the table and the connection is good. Is there another way to refer to the table?
>lnHandle = sqlconnect("trpSurvey") >IF lnHandle > 0 > TEXT TO lcSQL NOSHOW > SELECT @@SERVERNAME AS SrvName, DB_NAME() AS DbName > ENDTEXT > if sqlexec(m.lnHandle,lcSQL,"crsImport",aCountInfo) < 0 > aerror(laError) > messagebox(laError[1,2]) > ELSE > BROWSE NORMAL > endif > sqldisconnect(m.lnHandle) >ELSE > aerror(laError) > messagebox(laError[1,2]) >ENDIF >TRPSurvey is the name of a named connection in the database. After running your code it was apparent to me that it was not formed properly because it pointed to our master network server rather than my local PC. I guess I need some help creating the connection. The SQL file I need to get to is located at C:\Inetpub\wwwroot\TRPsurvey\App_Data\aspnetdb.mdf. It has been created with the Visual Web Developer Express as part of a web project. I have reworked the connection to point to my PC and it verifys the connection if the database is left blank, but if I add the database it fails and says access to the selected database has been denied. There is nothing else holding the database open so perhaps I need to register it with SQLServer or something? It does not show up as a choice in the login window.