Sp_MSins_... Missing Replication Error
Jan 21, 2004
While setting up replication to another server my other replications came with the error could not find sp_MSins_<destinationtabel>
Error number 2812.
Is there anyway I can rebuild this stored proceduire or what is the easiest way to start synchronizing again, I can't drop the destination database because the amount of data to replicate is too much
Regards
View 1 Replies
ADVERTISEMENT
Nov 26, 2002
Hi Gurus,
We have a SQL 2000 DB1 ( publisher) which is replicated using transactional replcation onto the secondary server DB2 ( subscriber). we have identity columns on the DB1 and we created those tables with 'not for replication' clause. we skipped the following errors in the replication profile '2601:2627:8102:20598'. on DB2 ( the subscriber ) some records are missing in some tables . ( I verified this with record count differences for some tables in both the servers DB1 & DB2.
How to find out what are all the records missing & the cause.
I have listed the msrepl_errors table on DB1 , distribution databases all I'm seeing there are error code 8102 , unable to update identity column.
Any Idea is appreciated.
- Thanks
Jay
View 1 Replies
View Related
May 22, 2007
i have transactional replication setup. recently i found that some of the new records in the publisher are not replicated to subscriber, but the replication is going on as normal with most of the record replicated.
the only this happen is user stop and restart the synchronization.
why this happen, how to find all the records which are not replicated and how to replicate to subscriber now.
View 1 Replies
View Related
Sep 21, 2006
I can't believe this. MSDE was a great product and I'm sure that SQL Express is even better. The difference is that I can't migrate any of my company's applications to it because they rely on a Replication architecture (requiring Replication Publication). And SQL Agent, how are you supposed to keep the database in good shape if you can't run Maintenance Plans at scheduled intervals?
I know, there are third party products out there to compensate for the lack of the SQL Agent, but they don't solve the replication problem. Besides, the Agent still exists in other editions - it's not like it has been dropped completely. Why do we have to lose functionality and features? We have already lost the use of a second CPU and memory > 1GB. Why do they need to keep taking stuff out? Why don't they just limit access to the new feature-set?
I would rather lose the new features such as Report Server and Full Text Indexing and get the SQL Agent and Replication Publication back. I can almost understand that with a free product, they don't want to keep piliing new features in just to give them away - even though I'm sure the sale of the larger editions more than covers the R&D investment in their construction. Why can't we chose? Agent or Report Server, Replication or Full Text Indexing? I don't need some of these new features (others might), I just want the features that I used to have. Perhaps SQL 2005 setup can be made to choose 2 out of the 4 features?
Whats more, I can't even say that I'll just stick with MSDE, as it now has a limited support life. Microsoft announced that any SQL Server version prior to 2005 SP1 will NOT be supported on Vista or Longhorn Server (nor does it support anything less than Windows 2000 SP4 or Windows XP SP2 where MSDE does).
OK - let me get this right. We had something that has been taken away in the new version. Perhaps I don't deserve the new version if I don't pay for it - fine - I'll stick to the old one I already have. BUT wait... I can't use that on the new platforms coming out.
Are my entry-level customers going to pay for the Workgroup Edition (add AUD$1200 to my entry level edition application of AUD$1500) to replace the Replication Publisher and provide a Maintenance plan? Is anyone going to pay for the re-architecting and re-construction of my application to work around these new limitations?
I guess that will be me. Is this what happens for being loyal to MS products?
Please - give back the SQL Agent and Replication publication.
Joe
View 1 Replies
View Related
Jul 23, 2005
One of the table that is in a merge replication somehow is missing anindex. Strangely, only the table in one of the subscriber of the mergereplication is missing the index; another subscriber and the publisherof the merge replication don't have this problem.How should I add the missing index back to that table? My understandingis that making structural change on a table that is inmerge-replication is different from making change on a table that isnot merge-replicated. For example, when we need to add a column into atable that is being merge-replicated, we must add the column bychanging the attributes in the properties of the published article(table) instead of simply using CREATE INDEX command. I am wonderingwhether there is a similar restriction on adding an index onto a tablethat is merge replicated.I have already added the index back to the table anyway. I am askinghere just in case doing this may get me into a problem later on.Thanks in advance for any info.Jay Chan
View 3 Replies
View Related
Jul 22, 2015
At my subscriber database I found some missing Indexes if I update all the missing Indexes on subscriber DB, does it impact at on publisher side?
View 2 Replies
View Related
Jul 18, 2007
Hi all,
We are using a mix of SQL 2005 and 2000 servers and our "main" database server is running SQL 2005 x64 (SP2 ver. 3042).
Our system has run perfectly for months, then subsequent to an SP2 update we are seeing several instances where the data record counts are different for several tables among all the servers.
We are using Merge Replication, with no filters and published every 2 minutes.
Any ideas?
TIA,
Michael
View 1 Replies
View Related
Jul 25, 2013
I have recently started using replication in SQL 2012 SP1. When a stored procedure is altered on the source, the changes are replicated to the subscribers; however, the comment headers are removed at the subscribers. Due to the vast number of stored procedures I have, I do not want to move the comments below the Create Procedure statement. Are there any other ways to have comment header move with the stored procedures?
Here is what I am experiencing
Source SP
ALTER PROCEDURE [dbo].[SPTest]
AS
BEGIN
SELECT GETDATE()
END
Destination SP
ALTER PROCEDURE [dbo].[SPTest]
AS
BEGIN
SELECT GETDATE()
END
View 7 Replies
View Related
Jun 9, 2006
We have SQL Server 2000 with merge replication at a Publisher and subscriber.
We have some records getting deleted at Publisher and Subscriber and no conflicts are logged.
We have tried the compensate_for_errors setting and this has had no effect.
This is causing serious data corruption and has now become an URGENT issue. Out tech team are almost out of ideas.
Has anyone experienced this or have any ideas as to what to check next?
View 3 Replies
View Related
Jan 23, 2008
Hello,
on the server this version is running:
SQL Server Express with Advanced Services
Datenbankmodul
[Version: 9.2.3042.00 Edition: Express Edition Patchebene: 9.2.3042 Sprache: Deutsch (Deutschland)]
Reporting Services
[Version: 9.2.3042.00 Edition: Express Edition Patchebene: 9.2.3042 Sprache: Deutsch (Deutschland)]
Now I will install the "replication" modul, but when I select the option, install replication the system need the
"sqlrun_sql.msi.
I have select the folder (the install folder where the "sqlrun_sql.msi" is) but I become the message:
like this: the "sqlrun_sql.msi" is not the right.... for you SQLEXPRESS Version......
here I found the same .....error:
http://www.codeprof.com/dev-archive/71/19-95-712279.shtm
what can I do,
thanks for help, marc
View 1 Replies
View Related
Jun 15, 2007
I'm getting this, after upgrading from 2000 to 2005.Replication-Replication Distribution Subsystem: agent (null) failed.The subscription to publication '(null)' has expired or does notexist.The only suggestions I've seen are to dump all subscriptions. Sincewe have several dozen publications to several servers, is there adecent way to script it all out, if that's the only suggestion?Thanks in advance.
View 3 Replies
View Related
Mar 6, 2007
Hello,I'm getting the following error message when I try add a row using aStored Procedure."The identity range managed by replication is full and must be updatedby a replication agent".I read up on the subject and have tried the following solutionsaccording to MSDN without any luck.(http://support.Microsoft.com/kb/304706 )sp_adjustpublisheridentityrange (http://msdn2.microsoft.com/en-us/library/aa239401(SQL.80).aspx ) has no effectFor Testing:I've reloaded everything from scratch, created the pulications from byrunning the sql scripts generated,created replication snapshots andstarted the agents.I've checked the current Identity values in the Agent Table:DBCC CHECKIDENT ('Agent', NORESEED)Checking identity information: current identity value '18606', currentcolumn value '18606'.I check the Table to make sure there will be no conflicts with theprimary key:SELECT AgentID FROM Agent ORDER BY AgentID DESC18603 is the largest AgentID in the table.Using the Table Article Properties in the Publications PropertiesDialog, I can see values of:Range Size at Publisher: 100,000Range Size at Subscribers: 100New range @ percentage: 80In my mind this means that the Publisher will assign a new range whenthe Current Indentity value goes over 80,000?The Identity range for this table cannot be exhausted! I'm not surewhat to try next.Please! any insight will be of great help!Regards,Bm
View 1 Replies
View Related
Aug 24, 2004
SHow me the correct way of doing this query please
strSQL = "INSERT INTO EmpSkill ([EmployeeNo]) VALUES ('"
strSQL = strSQL & TestArray(lngCount).EmpNo & "')
'Need to place this at then end
WHERE EmployeeName = & TestArray(lngCount).EmpName
Ive found out you cant use WHERE clauses with insert satements, so i am trying to use UPDATE
strSQL = "UPDATE EmpSkill SET EmployeeNo = " & TestArray(lngCount).EmpNo & " WHERE EmpoyeeName = " & TestArray(lngCount).EmpName
Getting missing operator in query expression 'EmployeeName = Karl Diggle'
View 3 Replies
View Related
May 4, 2005
Can anyone help me out with this statement. I am trying to insert data into table a from table b where table a and table b have three fields which are the same, and I keep getting a missing operator error. Thanks in advance.
Update test
SET officeaddress = b.address,
officeaddress2 = b.address2,
officecity = b.city,
officestate = b.state,
officezip = b.zip,
officephone = b.phone,
me = b.me,
ims = b.ims
FROM test a
INNER JOIN A751P b on b.firstname = a.firstname AND b.lastname = a.lastname AND b.state = a.state
View 12 Replies
View Related
Jan 31, 2007
After loading the BCP files that are created during the trigger/reporting events I've noticed that the data in the table is missingrecords. I've also noticed that the missing records (records in thetable but not in the BCP out files) seem to occur in contiguousblocks. Since the complete set of records exists in the table, Iassume this points to an issue in the way the TableUpdate script/Triggers interact with the system. But i tried to take out the bcpprocedure, do test on trigger, then no data missing, So, I think theproblem is still on bcp part. Could you help me with that?CREATE TABLE [EventUpdate] ([id] [int] NOT NULL ,[eventid] [int] NOT NULL ,[sequenceid] [int] NOT NULL ,[UpdatePass] [int] NULL) ON [PRIMARY]GOcreate trigger trgEventUpdate on EventLog For Insert,Update asinsert into EventUpdate (id,eventid,sequenceid) select ins.id,ins.eventid,ins.sequenceid from inserted insbcp script:bcp "select a.* from w..eventlog a, w..eventupdate b wherea.eventid=b.eventid and a.sequenceid=b.sequenceid and b.eventid<>-1and b.sequenceid<>-1 and b.updatepass=1" queryout 30sec-%TFN_NOW%.wrk -U <userwithaccess-P <password-S doserver -f EventLog.fmtThanks in advance for your reply!
View 3 Replies
View Related
Jul 20, 2005
Hi chapsJust been having my head messed with...I was running a trace capturing all errors and SQL. Had a bucket oferror 208's (invalid object name). Found the SQL that caused it - anSP.Ran the sp by hand, no messages come up - error 208 logged in thetrace.Couldn't work it out. Then noticed stats missing on one column.Created the stats manually - and suddenly the 208 error stops. Wtf?Is this predicted/expected behaviour? Just me being a noob?Thought I'd just share that. ta ;)SQL2k, sp3a, w2k server.
View 2 Replies
View Related
Apr 10, 2004
Hey
I am trying to retieve a value from teh database and add one to it, then update the database with thenew value before redirecting to a page.
I am recieving this error and don't know why, i have the following coed below.
Dim objReaderQ as OleDBDataReader
Dim strSQLRead As String
Dim objCmd As New OleDbCommand
strSQLRead ="Select Quantity from tblCart Where (Productid=" & intProdidHold & ") AND (Cartid='" & strCartid & "')"
objCmd = new OleDbCommand(strSQLRead, objConn)
objReaderQ = objCmd.ExecuteReader()
if objReaderQ.Read()
'update quantity by 1
Dim i as integer
i = objReaderQ("quantity")
i = i + 1
objReaderQ.Close()
Dim strSQLQuantity as String = "INSERT INTO tblCart (Quantity) VALUES (@quantity) WHERE (productid=" & intProdidHold & ") AND (Cartid='" & strCartid & "');"
Dim objCmdQuantity As New OleDbCommand(strSQLQuantity, objConn)
objCmdQuantity.Connection = objConn
objCmdQuantity.Parameters.Add("@quantity", OleDbType.VarChar, 255)
objCmdQuantity.Parameters("@quantity").Value = i
objCmdQuantity.ExecuteNonQuery() ' <--- Error Is Occuring On This Line
Response.Redirect("ViewBasket.aspx")
end if
I really can't see what is wrong as i have placed the semi colon it wanted at the end of the string.
Thanks you for your time
Chris
View 1 Replies
View Related
Jul 20, 2005
Hi - I can get this to work in SQL Server - but when also trying to makethe application compatible with MS Access I get an error:Select tblfaqnetgroups.group_name from tblfaqnetrolesInner Join tblfaqnetgroups ON tblfaqnetroles.group_id =tblfaqnetgroups.group_idInner Join tblaccess ON tblfaqnetroles.user_id = tblaccess.user_idAND tblaccess.user_id = 1The error in Access is:Syntax error (missing operator) in query expression'tblfaqnetroles.group_id = tblfaqnetgroups.group_idInner Join tblaccess ON tblfaqnetroles.user_id = tblaccess.user_id'Any help would be much appreciated,*** Sent via Developersdex http://www.developersdex.com ***Don't just participate in USENET...get rewarded for it!
View 3 Replies
View Related
Sep 7, 2006
Report X passes all it's parameters to Report Y via a "jump to report". Report Y then populates a select box based on the parameters passed to it. The user selects one of these values and clicks "View Report". This works perfectly in the development environment. But when I deploy it to the server I keep getting an error when I click the link that jumps to Report Y.
Here's the error: "The 'B' parameter is missing a value"
The problem is.. I don't want to pass the B parameter to Report Y. I want the user to select this from a list. I'm very confused as to why this would work in the development envionment but not when deployed.
Any Ideas?
View 3 Replies
View Related
Jun 22, 2007
Here I am creating a temp table with $ summations that I can later join with an employees table that I'm dumping into a flat file.
select
e.employee_no,
sum(p.fit) as sumfit,
sum(p.fica) - sum(p.medicare) as sumfica,
sum(p.medicare) as sumedic,
sum(p.fit_earnings) as pearnings,
sum(p.fit_earnings) as tearnings
into #earntable
from employees as e
left outer join pay_summary as p on e.employee_no =p.employee_no
where e.employee_no = 817 and
dateadd(d, 0, datediff(d, 0, p.dated)) between '20061231'and '20070401'
group by e.employee_no
select * from #earntable
When I go to look at the contents of the #earntable with the above select, I get this:
ODBC error 214 Procedure expects parameter '@handle' of type 'int'.
(42000)
The datatypes I'm trying to select into the temp table are all
numeric 12 except employee_no char 10.
What am I missing? A drop table statement?
View 6 Replies
View Related
Jun 23, 2006
Hi,Is there anyone encountered this error before & how it is being resolved?[Microsoft][ODBC SQL Server Driver][SQL Server]Missing end comment mark '*/'The error pops-up when I was running a DTS Import/Export from a SQL server(source) to another SQL server (destination) residing on a differentmachine. I'm copying all tables, views, & stored procedures of a database.Thanks for any input.Regards,Maricel
View 1 Replies
View Related
Mar 3, 2006
My config :
1 computer with win2000, IIS, McAfee Virus Scan, and all I need to develope.
1 computer with VS2005.
When I try to make merge replication I have this Error :Header information is either corrupted or missing.
I search on the web and find some information like that error is cause by NIS (Norton Internet Security) but I dont have it.
I have another mobile software in VS 2003 and I don't have trouble whit im. It work perfectly but not in VS 2005.
I can access to the replication folder. I use sscesa20.dll.
Need help
thanks.
View 2 Replies
View Related
Oct 20, 2006
Hi, in my app I connect to and read from a Sql Mobile database numerous times. Eventually and inconsistently my app will no longer be able to access the database and a SqlCeException is returned with native error 25123. This error translates to: "A SQL Mobile DLL could not be loaded. Reinstall SQL Mobile. [ DLL Name = sqlceqp30.dll ]". I've seen similar (and unsolved) problems involving RDA/replication, but I am not using any of that in my program. It simply connects to database, queries and retrieves data, then closes the connection. I am properly disposing of all SqlCE objects.
I'm not sure what the error really means. Once the program gets this error it is never able to access the database again until the program is restarted. I am still able to connect to that database from the Query Analyizer even after the program gets the error and hasnt been restarted (meaning if the program tried again after the QA's success it will still have same error).
Common suggestions for the similar RDA error are to put the initializion at the beggining of the program. In my case the database connection will succeed several times before the error occurs.
anyone have similar issue where you are not using replication but get error 25123?
View 8 Replies
View Related
Jun 18, 2007
Anyone know what causes this?
When trying to deploy a package using the deploy wizard, following error is received:
===================================Could not save the package "H:SSISRSlogRSExecutionLog_UpdateinDeploymentRSExecutionLog_Update.dtsx" to SQL Server "xxxxxxxxxxxxxxxxxxxxx". (Package Installation Wizard)===================================No description found------------------------------Program Location: at Microsoft.SqlServer.Dts.Runtime.Application.SaveToSqlServer(Package package, IDTSEvents events, String serverName, String serverUserName, String serverPassword) at Microsoft.SqlServer.Dts.Deployment.DtsInstaller.SavePackageToSqlServer(WizardInputs wizardInputs, String packagePassword, Boolean bUseSeverEncryption, String serverName, String userName, String password, String packageFilePath, List`1 configFileNames) at Microsoft.SqlServer.Dts.Deployment.DtsInstaller.InstallPackagesToSqlServer(WizardInputs wizardInputs)
View 1 Replies
View Related
Jan 22, 2008
Hi, Please could someone assist - the above error occurs. This is my code: Protected Sub btnReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) ' Response.Redirect("CrystalreportTEST_Print.aspx?C_id=" & ddlCompany.SelectedValue) Dim myConnection As New OleDbConnection(connString) Dim Str As String = "SELECT clientid,company FROM Client WHERE company =" & ddlCompany.SelectedItem.Text Dim cmd As New OleDbCommand(Str, myConnection) Dim ds As New DataSet Dim da As New OleDbDataAdapter(cmd) da.Fill(ds) Label7.Text = ds.Tables(0).Rows(0).Item("clientid") ' Response.Redirect("CrystalreportTEST_Print.aspx?C_id=" & ds.Tables(0).Rows(0).Item("clientid")) End Sub Thank you in advance
View 1 Replies
View Related
Jan 31, 2008
I'm getting the error listed above. To create this I used the wizard in VS2005 for the datagrid. The delete works but not the updating. I can't seem to find what's wrong. In the update parameters I've removed eventID and added it, neither works. Delete does work. Here's the code:
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" DataSourceID="ds1" DataKeyNames="eventID"><asp:CommandField ButtonType="Button" ShowEditButton="True" ShowDeleteButton="True" /><asp:BoundField DataField="eventID" HeaderText="ID" SortExpression="eventID" ReadOnly="True" /><asp:BoundField DataField="trainer" HeaderText="trainer" SortExpression="trainer" /><asp:BoundField DataField="employeeNumber" HeaderText="Emp#" SortExpression="employeeNumber" /><asp:BoundField DataField="area" HeaderText="Area" SortExpression="area" /><asp:TemplateField HeaderText="Training Date" SortExpression="trainingDate"><EditItemTemplate><asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("trainingDate", "{0:M/dd/yy}") %>'></asp:TextBox></EditItemTemplate><ItemTemplate><asp:Label ID="Label2" runat="server" Text='<%# Bind("trainingDate", "{0:M/dd/yy}") %>'></asp:Label></ItemTemplate></asp:TemplateField><asp:CheckBoxField DataField="additionalTrainerExpected" HeaderText="Addl Trainer Expected" SortExpression="additionalTrainerExpected" ><asp:TemplateField HeaderText="Ext Trainer" SortExpression="extendedTrainer"><EditItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("extendedTrainer") %>' /></EditItemTemplate><ItemTemplate><asp:CheckBox ID="CheckBox1" runat="server" Checked='<%# Bind("extendedTrainer") %>' Enabled="false" /></ItemTemplate><HeaderStyle Font-Names="Verdana" Font-Size="Small" /><ItemStyle Font-Bold="False" HorizontalAlign="Center" /></asp:TemplateField><asp:TemplateField HeaderText="NonExt Trainer" SortExpression="nonextendedTrainer"><EditItemTemplate><asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("nonextendedTrainer") %>' /></EditItemTemplate><ItemTemplate><asp:CheckBox ID="CheckBox2" runat="server" Checked='<%# Bind("nonextendedTrainer") %>' Enabled="false" /></ItemTemplate><HeaderStyle Font-Names="Verdana" Font-Size="Small" /><ItemStyle HorizontalAlign="Center" /></asp:TemplateField><asp:SqlDataSource ID="ds1" runat="server" ConnectionString="<%$ ConnectionStrings:TrainingClassTrackingConnectionString %>"ProviderName="<%$ ConnectionStrings:TrainingClassTrackingConnectionString.ProviderName %>"
UpdateCommand="UPDATE [trainingLog] SET [trainer] = ?, [employeeNumber] = ?, [additionalTrainerExpected] = ?, [extendedTrainer] = ?, [nonextendedTrainer] = ?, [area] = ?, [trainingDate] = ? FROM [trainingLog] WHERE [eventID] = ?">
<UpdateParameters><asp:Parameter Name="eventID" Type="Int32" /><asp:Parameter Name="trainer" Type="String" /><asp:Parameter Name="employeeNumber" Type="String" /><asp:Parameter Name="additionalTrainerExpected" Type="Boolean" /><asp:Parameter Name="extendedTrainer" Type="Boolean" /><asp:Parameter Name="nonextendedTrainer" Type="Boolean" /><asp:Parameter Name="area" Type="String" /><asp:Parameter Name="trainingDate" Type="DateTime" /></UpdateParameters>
<DeleteParameters><asp:Parameter Name="eventID" Type="Int32" /></DeleteParameters>
View 4 Replies
View Related
May 17, 2007
Hello All,
I have a package in which I have enabled "Package Configuration".
When I run the package i am sure that it reads the configuration file and executes the package correctly.
However if I remove the configuration file, the package still executes correctly with the settings which were used at the time of development.
I have event handlers for OnError and OnWarning and both these are NOT invoked.
IMO, this is incorrect behavior because if a package has been configured for "package configuration, then we should atleast have a warning generated that SSIS did not find the configuration and it would execute the package with hard coded values (from the time of development).
Is there any work around for this? how can I make SSIS warn me if the config file is missing for a package which was configured for package configuration?
View 5 Replies
View Related
Aug 19, 2006
Hi,
on executing the below query i am getting the following error
ERROR: Errors in the back-end database access module. Nested table keys in a SHAPE query must be sorted in the same order as the parent table. The nested query may be missing an ORDER BY clause.
even though the order by clause is presenet in the nested query
SELECT t.[ProductId], Predict ([Association].[Product Basket],3)
From
[Association]
PREDICTION JOIN
SHAPE {
OPENQUERY([Adventure Works Cycle MSCRM],
'SELECT DISTINCT [ProductId] FROM (SELECT ProductId FROM ProductBase) as [Product] ORDER BY [ProductId]')}
APPEND
({OPENQUERY([Adventure Works Cycle MSCRM],
'SELECT [ProductId] FROM (SELECT ProductId FROM ProductBase) as [Product] ORDER BY [ProductId]')}
RELATE [ProductId] To [ProductId]
)
AS
[Product] AS t
ON
[Association].[Product Id] = t.[ProductId] AND
[Association].[Product Basket].[Product Id] = t.[Product].[ProductId]
View 5 Replies
View Related
Sep 24, 2007
Hello and thanks in advance.
This error was received executing a SqlCeCommand method of ExecuteReader();
I have only found 3 hits in Google about this error and the time it was asked in a MS forum it was not answered. I need an answer, please.
bombar...see code below
SqlCeDataAdapter adp = null;
adp = new SqlCeDataAdapter();
SqlCeCommand cmd;
cmd = _Con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into InventoryCounts(DateTime,WarehouseID,PartID,LotID,UserName,Count) VALUES(?,?,?,?,?,?)";
adp.InsertCommand = cmd;
cmd = _Con.CreateCommand();
cmd.Parameters.Clear();
SqlCeParameter p1 = cmd.Parameters.Add("DateTime",SqlDbType.DateTime);
SqlCeParameter p2 = cmd.Parameters.Add("WarehouseID",SqlDbType.NChar,20);
SqlCeParameter p3 = cmd.Parameters.Add("PartID", SqlDbType.NChar,20);
SqlCeParameter p4 = cmd.Parameters.Add("LotID", SqlDbType.NChar,20);
SqlCeParameter p5 = cmd.Parameters.Add("UserName", SqlDbType.NChar,20);
SqlCeParameter p6 = cmd.Parameters.Add("Count", SqlDbType.Int);
p1.Value = Convert.ToString(DateTime.Now);
p2.Value = "Warehouse1";
p3.Value = txtBPartIDShow.Text;
p4.Value = txtBLotIDEntry.Text;
p5.Value = "JHB";
p6.Value = Convert.ToInt32(txtBCountEntry.Text);
cmd = _Con.CreateCommand();
cmd.CommandType = CommandType.Text;
cmd.CommandText = "insert into InventoryCounts(DateTime,WarehouseID,PartID,LotID,UserName,Count) VALUES(?,?,?,?,?,?)";
cmd.Prepare();
cmd.ExecuteReader();
View 4 Replies
View Related
Nov 13, 2007
Hello:
I am implimenting the creation of sequence numbers .I use an insert proc on a table that generates the numbers using an identity field:
procedure usp_createidentity
begin transaction
insert into [tblOrderNumber] with default values
rollback ' done so no records in this table
select @OrderNumber = scope_identity()
I call this from another proc that inserts values into my order table:
procedure usp_Insert @OrderNumber int
as
SET XACT_ABORT ON;
BEGIN TRY
BEGIN TRANSACTION
EXEC usp_GetNewOrderNumber @OrderNumber = @OrderNumber output
INSERT INTO [dbo].[tblOrder] ([OrderNumber]) values (@orderNumber) ' inserts value from other stored proc
COMMIT TRANSACTION
END TRY
BEGIN CATCH
if (XACT_STATE() = -1)
ROLLBACK TRANSACTION
else
if (XACT_STATE() = 1)
COMMIT TRANSACTION
END CATCH
Here is the problem. When I run usp_Insert I get the following: Error 266 Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing. Previous count = 1, current count = 0.
This refers to the usp_GetNewOrderNumber that is called inside the other proc as shown above.
The problem does not happen if I put each statement in usp_Insert in its own try/catch. transaction statements.
Maybe it has something to do with the rollback call in the usp_getneworder.
What do I need to do to get rid of this. problem and still run these within one try/catch trans statement set.
Thanks
View 9 Replies
View Related
Jan 28, 2008
Does anyone know of a way to capture in C# SQL PRINT ERROR MESSAGES generated from stored procedures? Any help would be greatly appreciated.
View 6 Replies
View Related
Dec 30, 2005
Two of my databases are still listed under the "Database" folder in SQL Express, yet all objects are now gone. Tried detach/attach and says it works OK - yet no tables, etc.
The odd thing is that I CAN access the tables from Visual C++ Express, and all looks well (data, etc).
When I look at Properties for one of the DBs, and then click on "View Connection Properties" under the "Options" section, the error message pops up:
"Cannot show requested dialog.----------------------------
ADDITIONAL INFORMATION:
Could not load file or assembly 'file:///C:Program FilesMicrosoft SQL Server90ToolsBinnVSShellCommon7IDESqlManagerUi.dll' or one of its dependencies. The system cannot find the file specified. (mscorlib) ".
/////////////////////////////////////////////////////////////////////////////////
Also still throwing an error upon startup, "Unhandled exception has occurred in a component in your application. If you click continue the application will ignore this error...Cannot create a stable subkey under a volatile parent"
Clues?
Thanks
S
PS It would help to enable right click Copy and Paste in this forum -
View 1 Replies
View Related
Sep 15, 2007
I'm trying to import XML Data from a .xml file and then running openXML command to insert relevent data into SQL server 2005.
First I'm importing XML records with help of Script Task(In SSIS) in batch of 1000 records in temporary String n passing this to Stored procedure ,which parses XML String with help of "sp_xml_preparedocument" .This SP it gives following error..
"An object or column name is missing or empty. For SELECT INTO statements, verify each column has a name. For other statements, look for empty alias names. Aliases defined as "" or [] are not allowed. Add a name or single space as the alias name."
I'm clueless about error,can some someone guide to workaround?
View 5 Replies
View Related