-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
System.InvalidOperationException: Invalid attempt to read when no data is present. #15
Comments
Can you please give an example script / arguments to reproduce the problem? |
I receive the same error trying to send my first email. I used the script to create the assembly and the sps. SampleScriptDECLARE @EventID nvarchar(255) EXEC sp_send_calendar_event SELECT EventID = @EventID |
Everything seems to be okay with your T-SQL code. Based on the error message, this seems to be an issue while getting DB Mail profile properties. Please try running the following query and see what's returned:
Also, you might have been using an outdated version of the script (it took me a while to update the T-SQL installation script after several improvements in the source code). |
I'll be closing this issue due to inactivity. |
Hi I am actually still having this issue. When I run the above SQL with my profile instead of sendgrid i get:
I'm currently attempting to use version 2.0 because I couldn't get any of the versions after that to install correctly. The relevant part of my script currently is:
|
Hi @twells-fi , Based on your output, it looks like your DBMail account is not configured properly. |
I created a follow-up issue which should take care of this one as well: #23 . |
Msg 6522, Level 16, State 1, Procedure dbo.clr_send_ics_invite, Line 0 [Batch Start Line 78]
A .NET Framework error occurred during execution of user-defined routine or aggregate "clr_send_ics_invite":
System.InvalidOperationException: Invalid attempt to read when no data is present.
System.InvalidOperationException:
at System.Data.SqlClient.SqlDataReaderSmi.EnsureOnRow(String operationName)
at System.Data.SqlClient.SqlDataReaderSmi.GetSqlString(Int32 ordinal)
at StoredProcedures.clr_send_ics_invite(SqlString profile_name, SqlString recipients, SqlString copy_recipients, SqlString blind_copy_recipients, SqlString from_address, SqlString reply_to, SqlString subject, SqlString body, SqlString body_format, SqlString importance, SqlString sensitivity, SqlString file_attachments, SqlString location, SqlDateTime start_time_utc, SqlDateTime end_time_utc, SqlDateTime timestamp_utc, SqlString method, SqlInt32 sequence, SqlString prod_id, SqlBoolean use_reminder, SqlInt32 reminder_minutes, SqlBoolean require_rsvp, SqlString recipients_role, SqlString copy_recipients_role, SqlString blind_copy_recipients_role, SqlString smtp_servername, SqlInt32 port, SqlBoolean enable_ssl, SqlBoolean use_default_credentials, SqlString username, SqlString password, SqlBoolean suppress_info_messages, SqlString& event_identifier, SqlString& ics_contents)
The text was updated successfully, but these errors were encountered: