Author |
Topic |
|
Lanstuff
New Member
USA
79 Posts |
Posted - 24 July 2005 : 11:42:45
|
Running mssql 2000 and getting this error. Any help would be appreciated. I just converted my forum from acces to mssql. Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]'mid' is not a recognized function name.
/forum/cal.asp, line 273
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 24 July 2005 : 20:06:21
|
In that file, back up until about line 257 and look forIf strDBType = "sqlserver" then and replace it withIf strDBType <> "access" then You'll need to make these same changes at approximately line 426 and line 757 in this same cal.asp file.
I did not find anyplace else in these files where this particular problem would occur, but I suspect you will now see more than the top 5 recent and upcoming events on the main page. If so, then you need to make two changes within cal_functions.asp - at approximately lines 476 and 585, there should be a line like thisIf strDBtype = "access" or strDBtype = "sqlserver" then strSql = strSql & "TOP " & intCalEventstoDisplay & " " You will need to comment this line out, and then scan down about 10-20 lines to find the line that readsset rs = Server.CreateObject("ADODB.Recordset") ABOVE this line you need to insert the following on it's own line:strSql = TopSQL(strSQL, 5) That should get it to behave again. Let me know if you found this second problem to occur, and if you did let me know if my solution fixed it. |
* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized. |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 24 July 2005 : 20:39:18
|
Sorry to say that this did not work. The error above is only affecting the display in the Day, Week and Month but not in the year and events list or settings. Is in cal.asp somewhere. I really appreciate your efforts, Thanks. |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 24 July 2005 : 21:05:48
|
Every other feature within the calendar feature appears to work correctly just affecting the display of the day, week and month. |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 24 July 2005 : 21:22:15
|
Have you got a Dim rs there @ line 348?
'Get the topics from the database
strSql = "SELECT T.TOPIC_ID, " & _
"T.T_SUBJECT, " & _
"T.T_MESSAGE, " & _
"T.T_AUTHOR, " & _
"T.FORUM_ID, " & _
"T.T_STATUS, " & _
"T.T_LIST_INCLUDE, " & _
"T.T_EVENT_DATE, " & _
"C.CAT_MODERATION, " & _
"F.F_MODERATION " & _
"FROM " & strTablePrefix & "TOPICS T, " & _
strTablePrefix & "CATEGORY C, " & _
strTablePrefix & "FORUM F " & _
"WHERE T.T_ISEVENT=1 " & _
"AND T.T_EVENT_DATE >= '" & DatetoStr(dateCursor) & "' " & _
"AND T.T_EVENT_DATE < '" & DatetoStr(DateAdd("d", 7 ,dateCursor)) & "' " & _
"AND F.FORUM_ID = T.FORUM_ID " & _
"AND C.CAT_ID = T.CAT_ID " & _
"ORDER BY T.T_EVENT_DATE Asc"
Dim rs
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open StrSql, My_conn
I had some grief getting the weekly display to work until I put that in. Give it a try. |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 24 July 2005 : 22:25:54
|
Here is my link for you to see if you would. Not fixed yet. Thanks |
Edited by - Lanstuff on 25 July 2005 01:01:07 |
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 24 July 2005 : 23:10:38
|
I think you misunderstood what I was saying - here's the fix to your problem: In cal.asp, look about line 257 and look forIf strDBType = "sqlserver" then and replace it withIf strDBType <> "access" then You'll need to make these same changes at approximately line 426 and line 757 in this same cal.asp file.
That will solve your [Microsoft][ODBC SQL Server Driver][SQL Server]'mid' is not a recognized function name problem. Everything else was not a server error to solve, but a display error that you won't see until you fixed the cal.asp problem. |
* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized. |
Edited by - gelliott on 24 July 2005 23:10:55 |
|
|
gelliott
Junior Member
USA
268 Posts |
Posted - 24 July 2005 : 23:12:03
|
As a side note, your link to your asp file doesn't work - (a) it's requiring a password, and (b) you need to provide us a link to a .txt version of your file. |
* The optimist says the cup is half full. The pessimist says it's half empty. But the engineer knows the truth - the cup's design is incorrectly sized. |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 25 July 2005 : 00:34:51
|
Here is link to txt file |
Edited by - Lanstuff on 25 July 2005 09:40:19 |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 25 July 2005 : 01:02:33
|
Still asking for login when trying to view the text file. |
|
|
StephenD
Senior Member
Australia
1044 Posts |
Posted - 25 July 2005 : 01:09:48
|
No, sorry still asking for login. Lanstuff, you still got my email? Send me the text file and I'll post it up for you. |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 25 July 2005 : 01:36:25
|
I am so sorry. I got my sql screwed up and I can't even get access. I am quite the novice. I am sorry to waste your time. THANKS |
|
|
Lanstuff
New Member
USA
79 Posts |
Posted - 27 July 2005 : 07:17:31
|
Got calendar to work in sql. Had to reinstall databases and mods in sql format. Then imported data into databases and cleared all errors. Prior I just imported into sql from access database, that process didn't work at all. THANKS AGAIN!!!!!!!!!!!! |
|
|
|
Topic |
|