CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 FREE CodeCharge Support

Print topic Send  topic

Author Message
Chad
Posted: 04/29/2002, 12:10 PM

we are trying to get the FREE CodeCharge Support system to work on sql 2000. Does anyone have it running on sql 2000?
spaceclown
Posted: 04/29/2002, 8:17 PM

I use SQL 7 is there anything that I can do to help? What is your problem? Connection?
CodeCharge Support
Posted: 04/30/2002, 4:37 AM

Hello,
CC Support system is available for CC pro users only.
Chad
Posted: 04/30/2002, 6:45 AM

CodeCharge Support
- We are a Pro user. That is how we got the code.

Spaceclown
- The connection is fine. When we try to login, nothing happends. The index page and functions are fine. We upsized the mdb using access 2002 to sql server 2000. Did you have to change any of the code to make it work?
spaceclown
Posted: 04/30/2002, 6:59 AM

There shouldnt need to be any changes. When I did this I used the import utility built into SQL. Be sure to use the SQL friver and not the ODBC this seems to have issues. I did have a few issues try to change the code to fully qualify the user table. example. databasename.tablecreator.tablename or gotocode.spaceclown.community. Double ceck the permissions in SQL and IIS.
Can you update,delete records? When you log and you receive the blank screen can you access any of your restricted pages? Hope this is helping.
Chad
Posted: 04/30/2002, 7:38 AM

We are using the SQL driver. I just went back and tried the import utility built into sql and get the same problem. When i get the blank page (page cannot be displayed), i cannot access any other pages. It seems if there is somehting wiht the custom code.
MIke
Posted: 04/30/2002, 1:02 PM

This is the error we get Microsoft VBScript runtime error '800a000d'

Type mismatch: 'SetVar'

/admCasesGrid.asp, line 517
CodeCharge Support
Posted: 05/02/2002, 2:44 AM

Hello,
please submit requests concerning support system to support.codecharge.com
CodeCharge Support
Posted: 05/02/2002, 2:44 AM

Hello,
please submit requests concerning support system to support.codecharge.com
chad
Posted: 05/03/2002, 11:59 AM

Spaceclown: did u have to change the ntext fields to vchar or nvchar? Di du change any code in the common.asp

Mine is given the following error:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]The text, ntext, and image data types cannot be used in an ORDER BY clause.

/Common.asp, line 34


and this is the line that it is referencing:

rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
CodeCharge Support
Posted: 05/06/2002, 2:22 AM

Chad,
this problem depends on db type. Some fields in project are of "text" type and it causing the error in MSSQL. In other databases (e.g. mySQL or Access) the same query works correct.

The workaround is to use custom sql for grid forms (in this case built in sorting functionality doesn't work) and allow sorting for some fields only using custom code.
Here is sample code for Open event of Grid form that let you overwrite CC siort code with custom one lets assume that the field for iSort = 3 is of "text" type):
if iSort = 1 then sOrder = " order by s.[case_id]" & sDirection
if iSort = 2 then sOrder = " order by s1.[support_status]" & sDirection
if iSort = 3 then sOrder = ""
if iSort = 4 then sOrder = " order by s2.[type]" & sDirection

Chad
Posted: 05/06/2002, 8:05 AM

I can create new grid froms and use search. It is just using the FREE CodeCharge Support system. The problem seems to in the common.asp. It tere anything that i can change in that file to make it work? Here is a copy of my common.as:


<!-- #INCLUDE FILE="adovbs.inc" -->
<!-- #INCLUDE FILE="TemplateObj.asp" -->
<%
'
' Filename: Common.asp
' Generated with CodeCharge 2.0.5
' ASP 2.0 & Templates.ccp build 11/30/2001
'
'===============================
' Database Connection Definition
'-------------------------------
' CodeCharge Support System Connection begin

Dim cn : Set cn = Server.CreateObject("ADODB.Connection")
'-------------------------------
' Create database connection string, login and password variables
'-------------------------------
Dim strConn, strLogin, strPassword
strConn = "mdais"
strLogin = "sa"
strPassword = "compaq"
'-------------------------------
' Open the connection
'-------------------------------
cn.open strConn, strLogin, strPassword
'-------------------------------
' CodeCharge Support System Connection end
'-------------------------------
' Create forward only recordset using current database and passed SQL statement
'-------------------------------
sub openrs(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenForwardOnly, adLockReadOnly, adCmdText
end sub

'-------------------------------
' Create static only recordset using current database and passed SQL statement
'-------------------------------
sub openStaticRS(rs, sql)
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = adUseServer
rs.Open sql, cn, adOpenStatic, adLockReadOnly, adCmdText
end sub
'===============================

'===============================
' Site Initialization
'-------------------------------
' Specify Debug mode (true/false)
Dim bDebug : bDebug = false
'-------------------------------
' Obtain the path where this site is located on the server
'-------------------------------
Dim sAppPath : sAppPath = left(Request("PATH_TRANSLATED"), instrrev(Request("PATH_TRANSLATED"), "\"))
'-------------------------------
' Create Header and Footer Path variables
'-------------------------------
Dim sHeaderFileName : sHeaderFileName = sAppPath & "header.html"
Dim sFooterFileName : sFooterFileName = sAppPath & "footer.html"
'===============================

'===============================
' Common functions
'-------------------------------
' Convert non-standard characters to HTML
'-------------------------------
function ToHTML(strValue)
if IsNull(strValue) then
ToHTML = ""
else
ToHTML = Server.HTMLEncode(strValue)
end if
end function

'-------------------------------
' Convert value to URL
'-------------------------------
function ToURL(strValue)
if IsNull(strValue) then strValue = ""
ToURL = Server.URLEncode(strValue)
end function

'-------------------------------
' Obtain HTML value of a field
'-------------------------------
function GetValueHTML(rs, strFieldName)
GetValueHTML = ToHTML(GetValue(rs, strFieldName))
end function

'-------------------------------
' Obtain database field value
'-------------------------------
function GetValue(rs, strFieldName)
on error resume next
if rs is nothing then
GetValue = ""
elseif (not rs.EOF) and (strFieldName <> "") then
res = rs(strFieldName)
if isnull(res) then
res = ""
end if
if VarType(res) = vbBoolean then
if res then res = "1" else res = "0"
end if
GetValue = res
else
GetValue = ""
end if
if bDebug then response.write err.Description
on error goto 0
end function

'-------------------------------
' Obtain specific URL Parameter from URL string
'-------------------------------
function GetParam(ParamName)
if Request.QueryString(ParamName).Count > 0 then
Param = Request.QueryString(ParamName)
elseif Request.Form(ParamName).Count > 0 then
Param = Request.Form(ParamName)
else
Param = ""
end if
if Param = "" then
GetParam = Empty
else
GetParam = Param
end if
end function

'-------------------------------
' Convert value for use with SQL statament
'-------------------------------
Function ToSQL(Value, sType)
Dim Param : Param = Value
if Param = "" then
ToSQL = "Null"
else
if sType = "Number" then
ToSQL = replace(CDbl(Param), ",", ".")
else
ToSQL = "'" & Replace(Param, "'", "''") & "'"
end if
end if
end function

'-------------------------------
' Lookup field in the database based on provided criteria
' Input: Table (Table), Field Name (fName), criteria (sWhere)
'-------------------------------
function DLookUp(Table, fName, sWhere)
on error resume next
Dim Res : Res = cn.execute("select " & fName & " from " & Table & " where " & sWhere).Fields(0).Value
if IsNull(Res) then Res = ""
DLookUp = Res
if bDebug then response.write err.Description
on error goto 0
end function

'-------------------------------
' Obtain Checkbox value depending on field type
'-------------------------------
function getCheckBoxValue(sVal, CheckedValue, UnCheckedValue, sType)
if isempty(sVal) then
if UnCheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = UnCheckedValue
else
getCheckBoxValue = "'" & Replace(UnCheckedValue, "'", "''") & "'"
end if
end if
else
if CheckedValue = "" then
getCheckBoxValue = "Null"
else
if sType = "Number" then
getCheckBoxValue = CheckedValue
else
getCheckBoxValue = "'" & Replace(CheckedValue, "'", "''") & "'"
end if
end if
end if
end function

'-------------------------------
' Obtain lookup value from array containing List Of Values
'-------------------------------
function getValFromLOV(sVal, aArr)
Dim i
Dim sRes : sRes = ""
if (ubound(aArr) mod 2) = 1 then
for i = 0 to ubound(aArr) step 2
if cstr(sVal) = cstr(aArr(i)) then sRes = aArr(i+1)
next
end if
getValFromLOV = sRes
end function

'-------------------------------
' Process Errors
'-------------------------------
function ProcessError()
if cn.Errors.Count > 0 then
ProcessError = cn.Errors(0).Description & " (" & cn.Errors(0).Source & ")"
elseif not (Err.Description = "") then
ProcessError = Err.Description
else
ProcessError = ""
end if
end Function

'-------------------------------
' Verify user's security level and redirect to login page if needed
'-------------------------------
function CheckSecurity(iLevel)
if Session("UserID") = "" then
cn.Close
Set cn = Nothing
response.redirect("login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
else
if CLng(Session("UserRights")) < CLng(iLevel) then
cn.Close
Set cn = Nothing
response.redirect("login.asp?QueryString=" & toURL(request.serverVariables("QUERY_STRING")) & "&ret_page=" & toURL(request.serverVariables("SCRIPT_NAME")))
end if
End if
end function
'===============================

'===============================
' GlobalFuncs begin
Session.Timeout = 60
' GlobalFuncs end
'===============================
%>
CodeCharge Support
Posted: 05/07/2002, 5:14 AM

Chad,
if you need more help with your project, please submit the request at support system.
Chad
Posted: 05/08/2002, 8:54 AM

I have sent messages to the support team. They keep sendng me in directions that are not related to my problem.
sdz
Posted: 05/08/2002, 3:35 PM

I also use sql2000,
my firs problem was to import an access db to sql, the transfer is fine.
The next step is to asign key to the apropiate fields, in serveral times if I did not assign the autonumeric or identity to yes in the key field I got troubles to work with examples...
Have you do that?
Saludos.
Sincotto
Posted: 03/24/2003, 9:58 PM

I get just a plain message "There is a problem with this page"
Any ideas
HAL9000
Posted: 06/26/2003, 3:23 AM

I get the same error

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.