Error occurred during execution of the database script - asp.net-mvc

I pushed a commit to git, and when I tried publishing the site, I get this error
'Web deployment task failed.(An error occurred during execution of the
database script.The error occurred between the following lines of the
script: 4264 and 4279. "IF NOT EXISTS(SELECT*FROM[_EFMIGRATIONHISTO"
Cannot insert the value NULL into column ' '.
I have searched everywhere and I cannot find a solution, and now I'm getting the 'Site Under Construction' error when I try my site's URL.

From the error:
You have a table Called 'Notes'
You are trying to insert some data in the 'Notes' table
The migration script is trying to insert data but the value for the 'PrescriberId' column is null in your migration script
Try to put a value for the 'PrescriberId' or set the 'Identity Increment' property of the 'PrescriberId' column to 1 so that it generates an id while inserting the data.

Related

SSIS Truncation in Flat file source

I am new to SSIS, I am importing a flat file data into SQL Server. It throws error while importing data in the flat file source task.
[Flat File Source [60]] Error: Data conversion failed. The data conversion for column "DCN_NAME" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
[Flat File Source [60]] Error: The "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" failed because truncation occurred, and the truncation row disposition on "Flat File Source.Outputs[Flat File Source Output].Columns[DCN_NAME]" specifies failure on truncation. A truncation error occurred on the specified object of the specified component.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on Flat File Source returned error code 0xC0202092. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure.
How to solve this issue. I don't have problem in destination.Is it possible to change the source field length?
I changed the source length in source connection manager. It works fine now.
You have not provided enough information to answer your question. Here is what I can gleam from what you have provided.
Your SSIS package is read a flat file and it assumes DCN_Name is data DT_STR
(type char). Confirm the origin and the destination have the same data type. If they do not, use a [Data Conversion] function which is found on the left side on the screen under Data Flow.
Be mindful that while SQL uses varchar and nvarchar, SSIS uses DT_WSTR and DT_STR. It can get confusing. In the link below you will find a SSIS to SQL Data Type Conversion
enter link description here
The errors generated by SSIS are counter intuitive.
The solution was use a data conversion because the source and destination were different data types.

Error on creating news archive on contao 3.5.16

If anyone familiar with contao,
I got a default contao error page when I try to create a news archive, I have check the log and nothing is wrong. Do I need add the news module first?
P.S I am newbie contao user, as a client only asked me to resolve this problem.
Last error log :
[12-Jan-2017 12:46:29 GMT] PHP Fatal error: Uncaught exception 'Exception' with message 'Query error: Unknown column 'master' in 'where clause' (SELECT id, title
FROM tl_news_archive
WHERE jumpTo IN (315) AND master=0
ORDER BY title)' thrown in /homepages/19/d124359810/htdocs/2016/system/modules/core/library/Contao/Database/Statement.php on line 295
I use 2 languages for the website with language extension.
I wonder if it has something to do with the language setting of main archive, because it somehow tells the error of unknown "master"
this is the screenshot of the interface when I tried to create a news archive.
Image : create new news archive
Your database is missing a column from the changelanguage extension. If you still have this extension installed, simply log into the Contao Install Tool and execute a database update.

Quartz.Net error on common logging.

I am getting the following error:
2013-11-14 11:57:33,994 [TestScheduler_QuartzSchedulerThread] ERROR Common.Loggi
ng.Factory.AbstractLogger.Error(:0) - An error occurred while scanning for the n
ext trigger to fire.
Quartz.JobPersistenceException: Couldn't acquire next trigger: Cannot insert the
value NULL into column 'SCHED_TIME', table 'quartz.dbo.QRTZ_FIRED_TRIGGERS'; co
lumn does not allow nulls. INSERT fails.
The statement has been terminated. ---> System.Data.SqlClient.SqlException: Cann
ot insert the value NULL into column 'SCHED_TIME', table 'quartz.dbo.QRTZ_FIRED_
TRIGGERS'; column does not allow nulls. INSERT fails.
The statement has been terminated.
I am using the example from HERE and I think I need to understand how jobs work with ADO.Net Jobstore better. My code works perfectly with RAMJobStore. Is there something else I have to do to get ADO to scan for triggers?
Turns out when I looked closer at the errors it was referencing the older version of Quartz.net.

Unable to retrieve destination column descriptions from the parameters of the SQL command

I am trying to upgrade an SSIS package from 2008 to 2012 and getting the below error.
Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has
occurred. Error code: 0x80004005.
An OLE DB record is available. Source: "Microsoft SQL Server Native
Client 11.0" Hresult: 0x80004005 Description: "The metadata could
not be determined because statement 'EXEC master.dbo.xp_logevent
#ErrorCode, #Message, error' in procedure 'DebugPrint' invokes an
extended stored procedure.".
Error: Unable to retrieve destination column descriptions from the
parameters of the SQL command.
Basically, we have an OLE DB Command to call a stored procedure which call several (nested) stored procedures and one of it is DebugPrint which call master.dbo.xp_logevent. Any idea to fix it? It works in SSIS 2008.
Thanks
You could try using 'with result sets' when calling your proc and setting your metadata there.
Example :
EXEC dbo.proc
WITH RESULT SETS (
ID INT
,Col2 VARCHAR)
I came across a similar error.
An OLE DB record is available. Source: "Microsoft SQL Server Native Client 11.0" Hresult: 0x80004005 Description: "The metadata could not be determined because statement '....' uses a temp table.".
Work around.
If SP uses a #table or ##table and it is used in the SP, then we need to specify the #table structure along with the EXEC.
The SP should be given along with the structure.
EXEC SP_TestTemp 1,2
it should be given like
EXEC SP_TestTemp 1,2 WITH RESULT SETS
(
(
id int,
Marks int
)
)
Note: the 'retain same connection = true' and 'validate external metadata' = false did not help/work here

Delphi SQLite Update causing errors to appear

I have used Inserts, selects, updates, deleted without problem all over the program but for some reason this specific section causes it to except and not run the SQL I send it.
I am trying to "UPDATE SectionTable(AreaID) VALUES ('+IntToStr(ActClient.AreaID)+') WHERE SectionID='+IntToStr(iCount)"
The section with the ID "iCount" exists deffinately. The ActClient.AreaID is "2" and its overwriting null data in the "SectionTable" table.
What is the problem here?
OpenDatabase(slDb);
sltb:=sldb.GetTable('SELECT * FROM SectionTable WHERE SectionID='+IntToStr(iCount));
OutputDebugString(PAnsiChar(sltb.FieldAsString(sltb.FieldIndex['SectionID'])+sltb.FieldAsString(sltb.FieldIndex['Gender'])+sltb.FieldAsString(sltb.FieldIndex['CompetitionID'])));
sSQL := 'UPDATE SectionTable(AreaID) VALUES ('+IntToStr(ActClient.AreaID)+') WHERE SectionID='+IntToStr(iCount);
sldb.ExecSQL(sSQL);
CloseDatabase(slDb);
I get this error message appear when this is ran.
---------------------------
Debugger Exception Notification
---------------------------
Project CompetitionServer.exe raised exception class ESQLiteException with message 'Error executing SQL.
Error [1]: SQL error or missing database.
"UPDATE SectionTable(AreaID) VALUES (2) WHERE SectionID=2": near "(": syntax error'. Process stopped. Use Step or Run to continue.
---------------------------
OK Help
---------------------------
UPDATE table SET column = expression, column = expression WHERE predicates

Resources