Am using sql 2000 to store data in the greek language. Using delphi built program to enter the data. The delphi program communicates with sql server via the ODBC connection I created. When I type in above 150 characters in a varchar column that can hold 600, the message (odbc manager - function sequence error) appears and does not allow me to save. However if I type in the english language, it saves without a problem. Here's the strange one-- if I type very very slowly in the greeek language it will save! Am using Windows XP english version.
Any ideas? I have spent above a month on this one!!
We are trying to upgrade a SQL server 2000 to a SQL 2008 R2 (SP1) server. After migrating, the developer test code, and got an error: ERROR [HY010] [Microsoft][ODBC SQL Server Driver]Function sequence error...But this is a release for 2008, ours is already 2008 R2 SP1, so that hot fix should already be included since it is always cumulative.
We have a package that does a simple table to table data loading. Both source and destination have the same Codepage (850) and collation (SQL_Latin1_General_CP850_CI_AI). However, there are some foreign language characters in the source table, and it gets messed up when it's loaded into the target.
Here's an example for a column with this type of text:
I have tried to load this row into another server in a different location and it works just fine, however the original target of data displays the text incorrectly.
Hi all, In my project i will have the data in a collection of objects, I need to update series of tables with foreign key relations Right now my code looks like this foreach(object obj in Objects){ int accountId=Account.Insert(obj.accountOpenDate,obj.accountName);//this will update the accounts table and returns account id which is a Identity column in Acccounts table int DebtId=Debt.Insert(accountd,obj.debtamount,obj.debtbalance); this will update the Debts table and returns DebtId ///series of tables like above but all the relevant data comes from obj and in the Insert Methods i am using stored procedures to Insert the data into table } The no of objects varies from 1000 to 1 milliion,, with this approach its taking more time to update all the data. Please let me know if any alternative procedure to handle this kind of scenario.
I need to create a function that will return a sequence number. The reason I need this to be a function is that I will use the function to create a view. In Oracle I would do something like this:
create sequence seq;
create or replace function f return number as l_seq number; begin select seq.nextval into l_seq from dual; return l_seq; end; /
create or replace view v as select f from dual;
Since Sql Server does not have a sequence object I have created a sequence table with a identity column and a procedure that inserts a dummy variable and returns the identity id. This works ok but to get my sequence number I must declare a variable, execute the procedure and select the return value. I need the procedure to be a function so that I can use it to create my view. Since I cannot use DML in a function and I cannot call a procedure from a function I am stuck. Do I have to create an extended procedure ? Any help is appreciated
Hi, I am using VB6 and sometimes when I try to display a report using cristal report 11 , I get this error "Logon Fail", I am working with SQL 2005 ENTERPRISE EDITION.
I want to know if I need an aditional configuration or something like that.
I get this message when I deploy my sequence clustering model:
Error 1 Error (Data mining): Duplicate Key Sequence values in an input case for SeqCluster. Ambiguous case(s) may lead to unreliable results. Disambiguate the data (recommended) or increase ErrorLog KeyErrorLimit server parameter. 0 0
I don't have any duplicate keys in my case table. I'm using a date for my key sequence column in my nested table. Is that the problem?
Hello.. When I used Microsoft SQL Server 2005 Management Studio Express to Create FULL TEXT INDEX by this code:
CREATE FULLTEXT INDEX ON txtfilestbl(txtfile) KEY INDEX PK_txtfilestbl ON ForumsArchiveLibCtlg WITH CHANGE_TRACKING AUTO
It returns this ERR MSG:
Informational: No full-text supported languages found. Informational: No full-text supported languages found. Msg 7680, Level 16, State 1, Line 1 Default full-text index language is not a language supported by full-text search.
I Use same this code to create FULL TEXT INDEX by using Microsoft SQL Server 2005 Management Studio, and it was working properly. What I have to do?
CSharp:SqlConnection Con = new SqlConnection("Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|Database.mdf;Integrated Security=True;User Instance=True"); its give ErrorUnrecognized escape sequence
I have a sequence container that contains a bunch of tasks.
I have a failure constraint that goes from the sequence container to execute sql task. The execute sql task then sends out an email upon a failure of the container, which is triggered by the failure of any given task inside the container.
My question is, is there a way to pass a SPECIFIC error message to the execute sql task?? That is, if one of the components inside the sequence container fails, I would like the email message to reflect the error message of that particular component, not just that the container failed, as there are different levels of severity of errors, depending on which component failed.
in first package of a migration solution (6 packages), have got a sequence container that "loops around" setting up initial mapping data for 17 tables (each table has 2 tasks within the control flow - purge / clean out and then re-populate - ).
the package has "transactionOption" set to required, as does the sequence container.
when i run the individual control flows, all goes ok
when i run the sequence container on the server (same one as database), all goes ok.
when i run the sequence container on my PC via VisualStudio 2005, get the above mentioned error code...
Task Purge FirstContactMethod_Mapping Table Start, 11:00:14 a.m. Validation has started Validation is completed Progress: Executing query "DELETE FROM zMapping_FirstContactMethod". - 100 percent complete Finished, 11:00:14 a.m., Elapsed time: 00:00:00.031 Task Load FirstContactMethod_Mapping Table Start, 11:00:14 a.m. Validation has started [DTS.Pipeline] Information: Validation phase is beginning. Progress: Validating - 0 percent complete Progress: Validating - 33 percent complete Progress: Validating - 66 percent complete Progress: Validating - 100 percent complete Validation is completed [DTS.Pipeline] Information: Prepare for Execute phase is beginning. Progress: Prepare for Execute - 0 percent complete Progress: Prepare for Execute - 33 percent complete Progress: Prepare for Execute - 66 percent complete Progress: Prepare for Execute - 100 percent complete [Create FirstContactMethod_Mapping Table [56]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Source_OLEDB" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. [DTS.Pipeline] Error: component "Create FirstContactMethod_Mapping Table" (56) failed the pre-execute phase and returned error code 0xC020801C. [DTS.Pipeline] Information: Cleanup phase is beginning. etc... etc...
this also occurs on a second migration solution we have developed.
in both cases, it occurs after c. 30 seconds of operation
for the above error, SSIS is trying to open the table to do a "OpenRowset Using FastLoad" - with the CommandTimeout set to 0.
we do not think it is due to the transaction being set - was occuring before we added transactions - think it is a timeout within the container object. We have set the CommandTimeouts to 0 for all of the purge commands and the re-populate commands)
environment is VS2005 on my PC, SQL2005 SP2 on server
have searched Google for this error - and whilst there are many entries, not many answers...
I have a Sequence Container with an Exec SQL Task in it. I can't delete the task or the container. I can't disable them.
Here's how I got there:
I put a Dataflow Task and the Exec SQL Task in the container, then set a precedence constraint. Lots of complaints moving either of them. Managed to delete the Dataflow Task, but now can't do anything.
Lets say that I have a 3 tables: 1) Sku, 2) ReceiptDetail and 3) OrderDetail. In the last 2, is a Sku column which needs to refer to the Sku table. I create ForeignKeys in the ReceiptDetail & OrderDetail pointing to the Sku table as follows: Alter Table ReceiptDetail Add Constraint fk_ReceiptDetail_SkuKey Foreign Key (SkuKey) References Sku (SkuKey) On Update Cascade On Delete No Action; The first 'Alter' (for ReceiptDetail) works, but the second gives me the following message: Introducing FOREIGN KEY constraint 'fk_OrderDetail_SkuKey' on table 'OrderDetail' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints. This worked in Sql Server 2000, but not 2005. I just wanted the Sku updated in the all other tables when updated in the main Sku table. I guess that I could use a trigger, but shouldn't need to.
Hi all, I'm new here so I hope this is the right place to post!!
I'm having a really big problem trying to make a table. I'm not new to the coding, but I'm no expert either.... as far as I can see I haven't done anything wrong...
I have many tables, but the first two are JobDetails and Promotions... in JobDetails, there is a primary key Job which needs to link to Promotions as a foreign key.... here is my code and errors, I'd really appreciate some help...
create table JOBDETAIL (Job varchar2(15) primary key, Dept varchar2(10) not null, Salary number(7) not null);
Hi, i have two tables, one is department-Table(Master table) and other is employee-table(Child table). DNO is a data field which is common in both the table. "DNO" is primary key in department-table and "DNO" is foreign key in child table.
I am trying to insert rows in the table i found the following error:
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Employee_Department". The conflict occurred in database "Project", table "dbo.Department", column 'Dno'.
I've been getting what I think is a bizarre error message whilst trying to create a foreign key between two tables.
tblDailyComments has a primary key of DiaryID tblDailyOperatingData has a column DiaryID.
Both are Int (4).
Yet when I run the following:
ALTER TABLE tblDailycomments ADD CONSTRAINT FK_tbldailycomments_tblDailyOpData FOREIGN KEY REFERENCES tblDailyOperatingData(DiaryID)
I'm getting the error message:
Server: Msg 8139, Level 16, State 1, Line 1 Number of referencing columns in foreign key differs from number of referenced columns, table 'tblDailycomments'.
I also tried to create the relationship in a database diagram and this brought back errors as well.
Hi guys, I have created 3 tables namely Static, Dynamic and Demo... Static has colums FormID(uniqueidentifier, PrimaryKey) and FormName(Nvarchar(50)). Dynamic has colums formID(uniqueidentifier,PrimaryKey) and FormName(Nvarchar(50)). Demo has 4 colums namely ValueID(uniqueidentifier, Primary Key), formID(uniqueidentifier, foreign key), Name(nvarchar(50)), Value(nvarchar(50).
Now the formID coloum in Demo table i have set as foreign key to both the dynamic table as well as static table on the formID colum in both table.
Now first i insert a row in the dynamic table then take the uniqueidentifier which is generated automatically and try to insert in the Demo table in formID colum as that colum is FK to dynamic and static but when i try to insert a row it show that its violating the FOREIGN KEY CONSTRAINT
the exact error is
Msg 547, Level 16, State 0, Line 1
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Demo_Dynamic1". The conflict occurred in database "huzefaJTest", table "dbo.Dynamic", column 'formid'.
The following SQL statements give me an error on the last line:
CREATE TABLE Employees (id int PRIMARY KEY NOT NULL, name nvarchar(50)); CREATE TABLE RandomTable (uniq int PRIMARY KEY NOT NULL, empid1 int NOT NULL, empid2 int NOT NULL); ALTER TABLE RandomTable ADD CONSTRAINT RandomTable_FKey_1 FOREIGN KEY (empid1) REFERENCES Employees (id) ON DELETE CASCADE; ALTER TABLE RandomTable ADD CONSTRAINT RandomTable_FKey_2 FOREIGN KEY (empid2) REFERENCES Employees (id) ON DELETE CASCADE;
The error is:
"The referential relationship will result in a cyclical reference that is not allowed."
Um...how is this cyclical? Is it because I have multiple cascade paths? If so, how do I go about doing the same thing?
Both tblRoom and tblEquipment have the red line error which when I highlight say the they both reference an invalid table!
Both tables are there and have primary keys defined as ID & Type. I have searched around and all I could find was that there maybe a permission problem.
I've been working on an SSIS package trying to load some data and the archive sequence is faulty. I've been trying to load a few tables created in a previous sequence into a local archive file and I've been getting the error "Could not find a part of the path."
The results aren't telling me what it's finding last and so I don't know where to start.
And the source DOES have data in it. It's something between the source and the destination.
Hello I have a problem with setting relations properly when inserting data using adonet. Already have searched for a solutions, still not finding a mistake... Here's the sql management studio diagram :
and that causes (at line 67):"The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Question_SurveyTemplate". The conflict occurred in database "ankietyzacja", table "dbo.SurveyTemplate", column 'id'. The statement has been terminated. at System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) at System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) at System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) at AnkietyzacjaWebService.Service1.createSurveyTemplate(Object[] o) in J:\PL\PAI\AnkietyzacjaWebService\AnkietyzacjaWebServicece\Service1.asmx.cs:line 397"
Could You please tell me what am I missing here ? Thanks a lot.
SELECT MAX(Case WHEN A2.AttrID = '23' AND A2.DefID = '9719132' THEN (Select Name from kua where ID=A2.Valint) END) as Manage FROM ree A1 inner join data A2 on A1.DataID=A2.ID AND A1.SubType=31066 inner join ancestors AN ON AN.DataID = A1.DataID and AN.AncestorID=9735190
Every time I run it i get this error:Cannot perform an aggregate function on an expression containing an aggregate or a subquery...If I change the Field definition to:
MAX(Case WHEN A2.AttrID = '23' AND A2.DefID = '9719132' THEN (A2.Valint) END) as Manager
then it works. The query Select Name from kua where ID=A2.Valint has only one field as result. Why do I get an error?
dear folks, please check my function i'm getting error like this
Select statements included within a function cannot return data to a client.
create function getuomid(@uomcode varchar(50)) returns varchar as begin declare @uom_id varchar(50) select uom_id from vuom where uom_code=@uomcode return @uom_id end go
Vinod Even you learn 1%, Learn it with 100% confidence.
Dear experts, please tell me where is the error in my code?
create function getitemid(@uomid varchar(50)) returns table as begin declare @itemid varchar(50) select @itemid= column01 from table21 where column03=(select dbo.getuomid('no of leaves')) return (@itemid) end go
Vinod Even you learn 1%, Learn it with 100% confidence.
Hi, I am write one storedprocedure,inside that i use sum function like SUM((CASE WHEN d_end_name_qualifier LIKE 'Oc' THEN duration ELSE 0 END)) d_to_stream then i get following error,
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionCheckForData (CheckforData()). Server: Msg 11, Level 16, State 1, Line 0 General network error. Check your network documentation.
With this statement I get an error where "Column QuoteHeaderID does not belong to table. " because Object reference isn't being set to an instance of an object, yet if I remove the max part it functions correctly.
Dim drTemp As dsContacts.ContactsRow = dsContacts.Contacts.FindByContactID(iContactCode) . . ""If Not IsDBNull(drTemp.MobilePhone) Then Me.lblMobilePhone.Text = cstr(drTemp.MobilePhone)"" . .
When I Execute it , it returns this error message :
Cast from type 'DBNull' to type 'String' is not valid
Hi, When I try to create a CLR function in SQL 2005 (June CTP) I get the following error: Msg 6505, Level 16, State 1, Procedure Extenso, Line 1Could not find Type 'Extenso' in assembly 'ExtensoNET'. The assembly registers successfully, with no errors. I use the following command to create the function:CREATE FUNCTION Extenso (@Valor float)RETURNS VARCHAR(255)AS EXTERNAL NAME ExtensoNET.Extenso.EscreveExtensoGO The function's code is the following: using System;using System.Collections.Generic;using System.Text;using Microsoft.SqlServer.Server;using System.Data.SqlClient; namespace ExtensoNET{ public class Extenso { [SqlFunction(DataAccess = DataAccessKind.Read)] public static string EscreveExtenso(double? nValor) { //Valida Argumento if (nValor==null || nValor <= 0 || nValor > 999999999.99) return ""; //Variáveis int nTamanho; string cValor, cParte, cFinal; string[] aGrupo = { "", "", "", "", "" }; string[] aTexto = { "", "", "", "", "" }; . . . } return cFinal; } }} Thanks in advance, Anderson
but when I use following - 3) select name, datalength(Name), charindex('_2_', Name), substring(name, 5, charindex('_2_', Name) - 3) from msdb.sysjobs.name
I get the result I want (last column): Job_4927_2_7Sun 30 9 4927_2 Job_250144_2_6Sat 34 11 250144_2 Job_30197_2_1Mon 32 10 30197_2
but also with an error: Server: Msg 536, Level 16, State 3, Line 1 Invalid length parameter passed to the substring function.