Monday, March 19, 2012
Invalid Cursor State
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
DanSounds like this KB article.
FIX: An invalid cursor state occurs after you apply Hotfix 8.00.0859 or
later in SQL Server 2000
http://support.microsoft.com/kb/831997
However, this MS PSS only fix looks like BUILD 876. BUILD 878 is public and
located here:
http://support.microsoft.com/?kbid=838166
Since these are cumulative, it would include the fix for the other.
Sincerely,
Anthony Thomas
"DLS" <DLS@.discussions.microsoft.com> wrote in message
news:2BB9D7A0-6BCE-426F-9375-7D205280F4DA@.microsoft.com...
After I create a table, if I attempt to modify or insert a column using the
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
Dan
Invalid Cursor State
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
DanSounds like this KB article.
FIX: An invalid cursor state occurs after you apply Hotfix 8.00.0859 or
later in SQL Server 2000
http://support.microsoft.com/kb/831997
However, this MS PSS only fix looks like BUILD 876. BUILD 878 is public and
located here:
http://support.microsoft.com/?kbid=838166
Since these are cumulative, it would include the fix for the other.
Sincerely,
Anthony Thomas
--
"DLS" <DLS@.discussions.microsoft.com> wrote in message
news:2BB9D7A0-6BCE-426F-9375-7D205280F4DA@.microsoft.com...
After I create a table, if I attempt to modify or insert a column using the
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
Dan
Monday, March 12, 2012
Invalid Cursor State
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
Dan
Sounds like this KB article.
FIX: An invalid cursor state occurs after you apply Hotfix 8.00.0859 or
later in SQL Server 2000
http://support.microsoft.com/kb/831997
However, this MS PSS only fix looks like BUILD 876. BUILD 878 is public and
located here:
http://support.microsoft.com/?kbid=838166
Since these are cumulative, it would include the fix for the other.
Sincerely,
Anthony Thomas
"DLS" <DLS@.discussions.microsoft.com> wrote in message
news:2BB9D7A0-6BCE-426F-9375-7D205280F4DA@.microsoft.com...
After I create a table, if I attempt to modify or insert a column using the
wizard in EM, I get the following error:
-Unable to modify table.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid Cursor State
I have SP3a installed, Analysis Services and SQL Reporting. Any suggestions?
Thanks.
Dan
Friday, March 9, 2012
Invalid Characters when setting up a subscription
run the report from the view tab, selecting parameters works fine.
When I attempt to create a subscription, I get "There is an error in
XML document (1, 6319)".
When I view the log, I see mention of an invalid character.
Why would it work on the view tab and not in the subscription setup?
Any help is greatly appreciated.
Craigdid you ever figure this out i have the same issue
"Craig" wrote:
> I have a report with some of the parameter values in French. When I
> run the report from the view tab, selecting parameters works fine.
> When I attempt to create a subscription, I get "There is an error in
> XML document (1, 6319)".
> When I view the log, I see mention of an invalid character.
> Why would it work on the view tab and not in the subscription setup?
> Any help is greatly appreciated.
> Craig
>
Wednesday, March 7, 2012
Invalid attempt to read when no data is present?
when execute
If IsDBNull(sqlreader.GetValue(i)) Then
Error info:Invalid attempt to read when no data is present
but i am sure there were records
Any ideas? Regards
Have you checked sqlreader.Read() is true?|||it's ture,below is my code
For i = 1 To sqlreader.FieldCount - 1
If IsDBNull(sqlreader.GetValue(i)) = false Then
Row.fieldname = Trim(sqlreader.GetName(i).ToString())
Row.fieldvalue = Trim(sqlreader.GetString(i))
End If
Next
both fieldcount and getname are right
Invalid attempt to read when no data is present using SQLdatareader
objReader = strCMD.ExecuteReader
objReader.Read()
if objReader.IsDBNull(0) = true then...
If NULL/Empty, display no records found. If records are found, display "1 or more records have been found". I keep getting the error "Invalid attempt to read when no data is present". I'm not sure what I am doing wrong here.Do While objReader.Read()
' your code.
Loop|||Use the HasRows property of a DataReader:
objReader = strCMD.ExecuteReader
If objReader.HasRows() Then
' Display 1 or more rows found
Else
' Display no rows found
End If
The reason your code was failing was because the "objReader.Read()" line attempts to access the next element in the DataReader, and so if it's empty then it becomes an invalid access, like trying to access one more index past the end of an array. If all you need is whether or not the DataReader contains any information, then HasRows is your easiest bet.|||And if what you need to do is access the info datareader contains, and are getting this error, and have a do while loop, what's the next thing to try?|||Look at why the SQL isn't returning anything!
Invalid attempt to read when no data is present
I am using a standard dbreader type of loop in a query to retrieve data. I am running over what should be end of record set, every time.
I have altered my read procedures to use while dbreader.read() and if dbreader.read(), to attempt to avoid getting the error. Neither is stopping it.
While debugging it, as I get to the last item and actually get the error, if I check the dbreader status, it still indicates that it has rows.
Anyone have any ideas on how to get around this?
TIA, Tom
Can you post your code?|||
Sure can. The below posted is the whole thing. The sqlcommand, connection, etc. should be irrelavant.
' get the data from the database and pass it back.
Function getTheData(ByVal cmd As String) As DataTable
' note that the passed cmd is the below sqlString
Dim sqlString As String = "SELECT CONVERT(char(20), Date, 107) AS Date, City, State, Company, Position, JobNumber, Row_Number() Over (ORDER BY JobNumber DESC) as Item FROM JobsDB "
' define the new datatable to hold our results
dt = New DataTable("Jobs")
' define the columns we will be saving
Dim dcIt As New DataColumn("Item", GetType(String))
Dim dcDt As New DataColumn("Date", GetType(String))
Dim dcCt As New DataColumn("City", GetType(String))
Dim dcSt As New DataColumn("State", GetType(String))
Dim dcJN As New DataColumn("JobNumber", GetType(Integer))
Dim dcKW As New DataColumn("KeyWords", GetType(String))
Dim dcPos As New DataColumn("Position", GetType(String))
Dim dcCo As New DataColumn("Company", GetType(String))
' add columns
dt.Columns.Add(dcIt)
dt.Columns.Add(dcDt)
dt.Columns.Add(dcCt)
dt.Columns.Add(dcSt)
dt.Columns.Add(dcJN)
dt.Columns.Add(dcKW)
dt.Columns.Add(dcPos)
dt.Columns.Add(dcCo)
' define datarow
Dim dr As DataRow
' build sql command info
sqlCmd = New SqlCommand
sqlCmd.Connection = sqlConn
sqlCmd.CommandType = CommandType.Text
sqlCmd.CommandText = sqlString
Try
sqlConn.Open()
dbReader = sqlCmd.ExecuteReader()
If dbReader.HasRows Then
While dbReader.Read() 'this can be changed to if dbreader.read(), no diff
' build the data table item from the database
dr = dt.NewRow()
dr("Item") = dbReader.Item("Item").ToString()
dr("Date") = dbReader.Item("Date").ToString()
dr("City") = dbReader.Item("City").ToString()
dr("State") = dbReader.Item("State").ToString()
dr("JobNumber") = dbReader.Item("JobNumber").ToString()
dr("Position") = dbReader.Item("Position").ToString()
dr("Company") = dbReader.Item("Company").ToString()
dr("KeyWords") = keywords
dt.Rows.Add(dr)
End While
Else
lblNoData.Visible = True
End If
Catch ex As Exception
Dim exMsg As String = Request.ServerVariables("Script_Name") + ", getTheData(cmd=" & sqlString & "): msg=" + ex.Message.ToString()
utils.writeApplicationLog(exMsg, System.Configuration.ConfigurationManager.AppSettings("UtilityDbName"))
Response.Redirect(ConfigurationManager.AppSettings("errorPage") & ConfigurationManager.AppSettings("errCatchAll") & "&return=" & Request.ServerVariables("Script_Host"))
End Try
Return dt.Copy
End Function
Thanks, Tom
|||The code worked for me using sample data.Some thoughts: Make the declarations of sqlConn, sqlCmd, and dbReader local to the function instead of global. Add a Finally section that contains dbReader.Close, sqlConn.Close, and sqlConn.Dispose.
If that doesn't change anything, is it possible that there's something in your data that is causing the problem?
Invalid attempt to read when no data is present
report that is almost identical and when there is no records to return it
doesn't generate an error message. Anyone have any ideas?
Thanks in advance.I found my problem, I had an extra if statement in my stored procedure. Not
sure how this stored procedure executed though but my report is working fine
now.
"GORAMS" wrote:
> I am getting this error message when I go to run my report. I have another
> report that is almost identical and when there is no records to return it
> doesn't generate an error message. Anyone have any ideas?
> Thanks in advance.