Syntax Error In TextHeader Of StoredProcedure Is There A Solution For This Bug....
Oct 23, 2007
TITLE: Microsoft SQL Server Management Studio
------------------------------
Script failed for StoredProcedure 'dbo.airsp_ValidateArea_China'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Script+StoredProcedure&LinkId=20476
------------------------------
ADDITIONAL INFORMATION:
Syntax error in TextHeader of StoredProcedure 'airsp_ValidateArea_China'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Microsoft SQL Server Management Studio get this error when trying to modify script the above stored procedure.
SQL server Query Analyzer open the above procedure with no error. And the procedure runs fine.
Does anyone have a solution for this problem?
I have tried dropping and recreating the proc the error still persists.
View 7 Replies
ADVERTISEMENT
Mar 8, 2004
Hi,
Im fairly new to writing stored procudures so I thought you lot might be able to help with this problem.
I have a stored procudure which looks like this:
CREATE PROCEDURE usrCienet.spAdminAgencyActivate_Select
(
@strAgencyId CHAR(6)
)
AS
DECLARE @idAgency INT
SELECT @idAgency = idAgency FROM tblAgencies WHERE strAgencyId = @strAgencyId;
SELECT strName, strAddress1, strAddress2, strCounty, strCountry, strPostcode, strTelephone, strFax, bitActive, bitHeadOffice, bitFinanceBranch
FROM tblBranches
WHERE fk_idAgency = @idAgency
SELECT strFirstName, strSurname, strUsername, bitActive
FROM tblUsers
WHERE fk_idAgency = @idAgency
GO
It basically first declare's and sets @idAgency using the first small select statment, then uses that parameter to run two more selects queries which I want sending to a dataset. Now within the Query Analyzer this works fine. But in my asp.net page it trows up this error:
Exception Details: System.Data.SqlClient.SqlException: Line 1: Incorrect syntax near 'spAdminAgencyActivate_Select'
Now the code im using in the asp.net page is as follows:
Dim objSqlConnection as New SqlConnection(ConfigurationSettings.AppSettings("strCon"))
Dim objSqlCommand_Select as New SqlCommand("spAdminAgencyActivate_Select", objSqlConnection)
objSqlCommand_Select.Parameters.Add(New SqlParameter("@strAgencyId", SqlDbType.Char, 6))
objSqlCommand_Select.Parameters("@strAgencyId").Value = "tes001"
Dim objSqlDataAdapter as New SqlDataAdapter(objSqlCommand_Select)
Dim dsActivateAgency as New DataSet()
objSqlConnection.Open()
objSqlDataAdapter.TableMappings.Add("Table", "tblBranches")
objSqlDataAdapter.TableMappings.Add("Table1", "tblUsers")
objSqlDataAdapter.Fill(dsActivateAgency)
objSqlConnection.Close()
Can anyone help? I believe the error is in the stored procedure somewhere, because if I change the stored procedure so no parameters are being passed to it then it starts working. This is what I comment out and change for it to to get it working, but obviously this is not satisfactory as a final result because the parameter is hard coded in the stored procedure. Im just showing this to see if it gives anyone a clue!!
CREATE PROCEDURE usrCienet.spAdminAgencyActivate_Select
--(
--@strAgencyId CHAR(6)
--)
AS
--DECLARE @idAgency INT
--SELECT @idAgency = idAgency FROM tblAgencies WHERE strAgencyId = @strAgencyId;
SELECT strName, strAddress1, strAddress2, strCounty, strCountry, strPostcode, strTelephone, strFax, bitActive, bitHeadOffice, bitFinanceBranch
FROM tblBranches
WHERE fk_idAgency = 1
SELECT strFirstName, strSurname, strUsername, bitActive
FROM tblUsers
WHERE fk_idAgency = 1
GO
Thanks in advance for any help!!
- Carl S
View 1 Replies
View Related
Jun 18, 2008
Hello everyone,I am developing forums (Discussion Board) in C#.net 2005 with SqlServer. Right now i am having problem in fetching data from two tables.Here are the tables from which i want to fetch data.Topics Table Threads TableTopicID ThreadIDForumID TopicIDTopicName SubjectTopicDescription Replies UserID LastPostDatenow i want to fetch all the topic talbe data as well as total no of threads,Lastpostdate,UserID per topic.I am able to fetch topic table data and Total no of threads per topic through the following query.SELECT TopicID, ForumID, TopicName, TopicDescription,(SELECT COUNT(ThreadID) FROM Portal_Threads WHERE (TopicID = Portal_Topics.TopicID)) AS Threads FROM Portal_Topicsbut i am not able to fetch anoter two detail with subquery as i am getting error likeonly one expression can be specified in the select listorsubquery returned more than one value.can anyone tell me how can i fetch these two values per topic. should i use stored procedure and create temporary table and after fetching these values i can store it in temporary table and i can fetch values from that temporary table...please provide code snippet if possible as i've never used sqlserver before..Thanks in advance...Regards,Nil
View 8 Replies
View Related
Feb 4, 2003
I have a DTS package (AdIns) that inserts to an administrative table. The Administrative table utilizes the "with ignore_dup_key" option on the index. There are other admin jobs in the DTS that are based on the return code of a parent package.
The "3604:duplicate key ignored" is an expected result of the parent package, yet it sends an failure return code to the dependent (AdIns) package, causing erroneous entries to the final audit table.
How can I reset the return code from the parent package?
TIA!:mad:
View 1 Replies
View Related
Oct 10, 2007
Hi,
I'm getting an error when i try to open an SP. The error message is: Property 'TextHeader' is not available for Stored Procedure.
This procedure also has a small lock icon with it.
Can anybody tell me what's the problem with this SP?
---
Thanks in advance,
Manjunath HK
View 3 Replies
View Related
Feb 21, 2008
create procedure userAuthenticate (@username nvarchar(50), @password nvarchar(50))AS DECLARE @ID IdentityCol DECLARE @actualPassword nvarchar(50)
Select @id, @actualPassword from User where @actualpassword = @password and username = @username
Return 1
The error says incorrect syntax near "user". unable to identify the problem.
View 3 Replies
View Related
Oct 18, 2007
What does Invalid object name "MyTable" mean?
I checked the table and column names. They are both correct.
Will the error mean something else, e.g. wrong data type, or no data?
TIA,Jeffrey
Dim strConn As String = ConfigurationManager.ConnectionStrings("MyConnectString").ConnectionStringDim oConn As New OleDbConnection(strConn)Dim oDBCommand As New OleDbCommand("MyStoredProceduret", oConn)oDBCommand.CommandType = CommandType.StoredProcedureoDBCommand.Connection.Open()Dim rtnValue As String = oDBCommand.ExecuteScalar() This is the error source file
This is the SPCREATE PROCEDURE MyStoredProcedure ASSELECT SettingsReqSchdTimeout FROM SettingsGO
View 9 Replies
View Related
Jul 21, 2005
hi,
i use this solution for an import file but give me an error. why?
"Server: Msg 208, Level 16, State 1, Procedure SP_IMPORTARARCHIVOS_BCP, Line 31
Invalid object name 'logtable'."
that is the solution
Create procedure
set quoted_identifier off
go
Create procedure usp_ImportMultipleFilesBCP @servername varchar(128),
@DatabaseName varchar(128), @filepath varchar(500), @pattern varchar(100),
@TableName varchar(128)
as
declare @query varchar(1000)
declare @max1 int
declare @count1 int
Declare @filename varchar(100)
set @count1 =0
create table #x (name varchar(200))
set @query ='master.dbo.xp_cmdshell "dir '+@filepath+@pattern +' /b"'
insert #x exec (@query)
delete from #x where name is NULL
select identity(int,1,1) as ID, name into #y from #x
drop table #x
set @max1 = (select max(ID) from #y)
--print @max1
--print @count1
--select * from #y
While @count1 <= @max1
begin
set @count1=@count1+1
set @filename = (select name from #y where [id] = @count1)
set @Query ='bcp "'+ @databasename+'.dbo.'+@Tablename + '"
in "'+ @Filepath+@Filename+'" -S' + @servername + ' -T -c -r -t,'
set @Query = 'MASTER.DBO.xp_cmdshell '+ "'"+ @query +"'"
--print @query
EXEC ( @query)
insert into logtable (query) select @query ?????
end
thanks!!!!
Christian from Argentina..Sud America!!!
drop table #y
Execute the Procedure
Execute the above procedure by passing the parameters shown below.
Example 1: To import all .csv files from folder c:myimport to a table Account
Exec usp_ImportMultipleFilesBCP 'SQL','Bank','c:Myimport','*.csv','Account'
Example 2: To import all files from the folder c:myimport to a table Account
Exec usp_ImportMultipleFilesBCP 'SQL','Bank','c:Myimport','*.*','Accoun
View 7 Replies
View Related
Jan 12, 2006
I am trying to open the solution and it is giving me error
"The application for the project \.... est.dtproj is not installed
Make sure application for the project type(.dtproj) is installed."
I tried to open any SSIS solution and it is giving me same error.
Anybody has any ideas how to resolve this problem?
View 7 Replies
View Related
Feb 19, 2007
I've submitted a bug report for this, but I also want to be sure it's not my own installation.
In the solution explorer, when I drag a package (usually accidentally) to another spot in the list, it disappears from the list. If I try to re-add the package, it thinks the original already exists, and names the second one with a "(1)" suffix. I can work around this by moving the original package out of the primary package folder and then re-adding it through solution explorer, but that's a touch cumbersome.
I don't really have a question here other than perhaps validation of the issue. Thanks.
Here's the bug report if others experience the same issue:
https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=258908
View 1 Replies
View Related
Jul 3, 2007
Here is the solution to this error message if anyone gets one in the future...It took me about two days to figure out.
This error occurs if you save your stored procedure before execute it. Always execute first before you save. If you save before executing, the server will store its own defaults, usually integers.
This error aslo occurs if your datatypes do not match when passing values from code into the variables of a stored procedure.
It also occurs if the datatypes in your sql file do not match those of the original stored procedure.
You can check to see if the file saved in the "Projects" folder matches with the original by doing the following:
Expand Database, Expand Programmability, Expand Stored Procedures, Expand (Your Stored Procedure), Expand Parameters. Read the datatypes that are revealed in the tree.
Then go to File>Open>Projects>(save sql file). Click open.
View the datatypes in the file. If the datatypes in the file do not match the datatypes in the tree, what you must do to correct, as one solution, is delete both the file and stored procedure.
Then create a new stored procedure by right clicking the stored procedure node. Rewrite the store procedure, execute and then save. Everything should be okay.
View 3 Replies
View Related
Apr 9, 2008
hi
i am working with Asp.net2.0,Sqlserver2000.
i uploaded my developed application to the webserver.
all webpages are opening..bt when i try to interact with database it is raising error as following..
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 25 - Connection string is not valid) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
i set Enamble to namedPipes,Tcp/IP
i set Remote connection to enable
my web.config looks like this..
<?xml version="1.0"?>
<configuration> <appSettings>
<add key="cn" value="User ID=redot;Password=redot;Data Source=216.185.43.148:1423;Initial Catalog=redot" /> <!--<remove key="LocalSqlServer"/> ;ProviderName=System.Data.SqlClient-->
</appSettings> <connectionStrings> <!--<remove name="LocalSqlServer"/>-->
<add name="redotConnectionString" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString1" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString2" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString3" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString4" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString5" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString6" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString7" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString8" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString9" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> <add name="redotConnectionString10" connectionString="Data Source=216.185.43.148:1423;Initial Catalog=redot;User ID=redot;Password=redot" providerName="System.Data.SqlClient" /> </connectionStrings> <system.web>
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=216.185.43.148:1423;User ID=redot;Password=redot;Trusted_Connection=True" cookieless="false" timeout="60" />
<compilation debug="true" /> <!-- The <authentication> section enables configuration of the security authentication mode used by ASP.NET to identify an incoming user. -->
<customErrors mode="Off"> <error statusCode="404" redirect="filenotfound.htm" /> </customErrors>
</system.web> <system.net>
<mailSettings>
<smtp> <network host="216.185.54.55" port="25" /> </smtp> </mailSettings>
</system.net></configuration>
i will be very thankful ,if anyone help me to resolve this problem..
pls..its urgent for me
Thanks& Regards
Shobha
View 1 Replies
View Related
Nov 1, 2007
Any help would be apprecaited....
aspnet_wp!library!1!11/01/2007-09:36:59:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details., EnsureMyReportsExists: Users folder not found when My Reports accessed.;
Info: Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
aspnet_wp!library!1!11/01/2007-09:37:04:: i INFO: Exception dumped to: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFiles flags= ReferencedMemory, AllThreads, SendToWatson
aspnet_wp!webserver!1!11/01/2007-09:37:04:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details.
10/31/07 14:54:06, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x053F5860
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 14:54:06, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 14:54:10, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 14:54:10, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0001.mdmp
10/31/07 14:54:10, ACTION, aspnet_wp.exe, Watson Invoke: No
10/31/07 15:25:56, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x07E31E9C
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 15:25:56, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 15:25:59, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 15:25:59, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0002.mdmp
10/31/07 15:25:59, ACTION, aspnet_wp.exe, Watson Invoke: No
10/31/07 15:28:01, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x07E32A04
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 15:28:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 15:28:04, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 15:28:04, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0003.mdmp
10/31/07 15:28:04, ACTION, aspnet_wp.exe, Watson Invoke: No
10/31/07 15:29:31, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x07E3356C
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 15:29:31, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 15:29:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 15:29:34, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0004.mdmp
10/31/07 15:29:34, ACTION, aspnet_wp.exe, Watson Invoke: No
10/31/07 15:31:14, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x07E340D4
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 15:31:14, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 15:31:17, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 15:31:17, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0005.mdmp
10/31/07 15:31:17, ACTION, aspnet_wp.exe, Watson Invoke: No
10/31/07 15:37:52, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 2160
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x07E34C3C
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
10/31/07 15:37:52, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
10/31/07 15:37:54, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
10/31/07 15:37:54, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0006.mdmp
10/31/07 15:37:54, ACTION, aspnet_wp.exe, Watson Invoke: No
11/01/07 09:37:01, ERROR , SQLDUMPER_UNKNOWN_APP.EXE, AdjustTokenPrivileges () failed (00000514)
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Input parameters: 4 supplied
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ProcessID = 260
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ThreadId = 0
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Flags = 0x0
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDumpFlags = 0x0
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, SqlInfoPtr = 0x47405860
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, DumpDir = <NULL>
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExceptionRecordPtr = 0x00000000
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ContextPtr = 0x00000000
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ExtraFile = <NULL>
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, InstanceName = <NULL>
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, ServiceName = <NULL>
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 11 not used
11/01/07 09:37:01, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 15 not used
11/01/07 09:37:04, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, Callback type 7 not used
11/01/07 09:37:04, ACTION, SQLDUMPER_UNKNOWN_APP.EXE, MiniDump completed: C:Program FilesMicrosoft SQL ServerMSSQL.4Reporting ServicesLogFilesSQLDmpr0007.mdmp
11/01/07 09:37:04, ACTION, aspnet_wp.exe, Watson Invoke: No
View 6 Replies
View Related
Nov 30, 2006
VB.NET 2005 Express and SQL Server 2005 Express - NOT saving updates to DB - SOLUTION!
-----------------------------------
The following article is bogus and confusing:
How to: Manage Local Data Files - Setting 'Copy to Output Directory' to 'Do not copy'
http://msdn2.microsoft.com/en-us/library/ms246989.aspx
You must manually copy the database file to the output directory
AFTER setting 'Copy to Output Directory' to 'Do not copy'.
Do not copy
The file is never copied or overwritten by the project system. Because your application creates a dynamic connection string that points to the database file in the output directory, this setting only works for local database files when you manually copy the file yourself.
You must manually copy the database file to the output directory
AFTER setting 'Copy to Output Directory' to 'Do not copy'.
-----------------------------------
The above article is bogus and confusing.
This is rediculous!
This is the most vague and convoluted bunch of nonsince I've ever come accross!
Getting caught out on this issue for the 10th time!
And not being able to find an exact step-by-step solution.
--------------------------
I've tried it and it doesn't work for me.
Please don't try what the article eludes to as I'm still sorting out exactly what is supposed to be happening.
If you have a step-by-step procedure that can be reproduced this properly please PM me.
I would like to test its validity then update this exact post as a solution rather than just another dicussion thread.
Many thanks.
This is the exact procedure I have come up with:
NOTE 1: DO NOT allow VB.net to copy the database into its folders/directorys.
NOTE 2: DO NOT hand copy the database to a folder/directory in your project.
Yes, I know its hard not to do it because you want your project nice and tidy.
I just simply could NOT get it to work.
You should NOT have myData.mdf listed in the Solution Explorer. Ever.
Create a folder for your data following NOTE 2.
Copy your data to that folder. * mine was C:mydatamyData.mdf
Create a NEW project.
Remove any Data Connections. ( no matter what)
Save it.
Data | View Data Sources
Add New Data Source
select NEW CONNECTION ( No Matter what, do it!
Select the database. * again mine was C:mydatamyData.mdf
Answer NO to the question:
Would you like to copy the file to your project and modify the connection?
- NO ( no matter what - ANSWER NO ! - Absolutely NO )
Then select the tables you want in the DataSet.
and Finish.
To Test ----------
From the Solution Explorer | click the table name drop down arrow | select details
Now Drag the table name onto the form.
The form is then populated with a Navigation control
and matching Labels with corresponding Textboxes for each field in the table.
Save it.
1) Run the app.
Add one database record to the database by pressing the Add(+) icon
Just add some quick junk data that you don't mind getting lost if it doesn't save.
YOU MUST CLICK THE SAVE ICON to save the data you just entered.
Now exit the application.
2) Run the app again.
And verify there is one record already there.
Now add a second database record to the database by pressing the Add (+) icon.
NOW add some quick junk data that you WILL intentionally loose.
*** DO NOT *** press the save icon.
Just Exit the app.
3) Again, Run the app.
Verify that the first record is still there.
Verify that the Second record is NOT there.
Its NOT there because you didn't save the data before exiting the app.
Proving that YOU MUST CLICK THE SAVE ICON to save the data you just entered.
Also proving you must add your own code to catch the changes
and ask the user to save the data before exitiing or moving to another record.
As a side note, since vb.net uses detached datasets,
(a copy/snapshot of the dataset in memory and NOT directly linked to the database)
the dataset will reflect all changes made when moving around the detached datasets.
YOU MUT REMEMBER TO SUBMIT YOUR CHANGES TO THE DATABASE TO SAVE THEM.
Otherwise, they will simply be discarded without notice.
Whewh!
I hope this saves me some time the next time I want to start a new database project.
Oh, and uh, for anyone else reading this post.
Thanks,
Barry G. Sumpter
Currently working with:
Visual Basic 2005 Express
SQL Server 2005 Express
Developing Windows Forms with
101 Samples for Visual Basic 2005
using the DataGridView thru code
and every development wizard I can find within vb.net
unless otherwise individually stated within a thread.
View 17 Replies
View Related
Jul 12, 2007
Hi All,
i have migrated a DTS package wherein it consists of SQL task.
this has been migrated succesfully. but when i execute the package, i am getting the error with Excute SQL task which consists of Store Procedure excution.
But the SP can executed in the client server. can any body help in this regard.
Thanks in advance,
Anand
View 4 Replies
View Related
Apr 20, 2007
Hi, all
I'm getting this error at runtime when my page tries to populate a datagrid. Here's the relevant code.
First, the user selects his choice from a dropdownlist, populated with a sqldatasource control on the aspx side:<asp:SqlDataSource ID="sqlDataSourceCompany" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [PayrollCompanyID], [DisplayName] FROM [rsrc_PayrollCompany] ORDER BY [DisplayName]">
</asp:SqlDataSource>
And the dropdown list's code:<asp:DropDownList ID="ddlPayrollCompany" runat="server" AutoPostBack="True" DataSourceID="sqlDataSourcePayrollCompany"
DataTextField="DisplayName" DataValueField="PayrollCompanyID">
</asp:DropDownList>
Then, I use the selectedindexchanged event to bind the data to the datagrid. Here's that code:
1 Sub BindData()
2
3 Dim ds As New DataSet
4 Dim sda As SqlClient.SqlDataAdapter
5 Dim strSQL As String
6 Dim strCon As String
7
8 strSQL = "SELECT [SocialSecurityNumber], [Prefix], [FirstName], [LastName], [HireDate], [PayrollCostPercent], " & _
9 "[Phone], [BadgeNumber], [IsSupervisor], [SupervisorID], [IsUser], [IsScout] FROM [rsrc_Personnel] " & _
10 "WHERE ([PayrollCompanyID] = @PayrollCompanyID)"
11
12 strCon = "Data Source=DATASOURCE;Initial Catalog=DATABASE;User ID=USERID;Password=PASSWORD"
13
14 sda = New SqlClient.SqlDataAdapter(strSQL, strCon)
15
16 sda.SelectCommand.Parameters.Add(New SqlClient.SqlParameter("@PayrollCompanyID", Me.ddlPayrollCompany.SelectedItem.ToString()))
17
18 sda.Fill(ds, "rsrc_Personnel")
19
20 dgPersonnel.DataSource = ds.Tables("rsrc_Personnel")
21 dgPersonnel.DataBind()
22
23 End Sub
24
I'm assuming my problem lies in line 16 of the above code. I've tried SelectedItemIndex, SelectedItemValue too and get errors for those, as well.
What am I missing?
Thanks for anyone's help!
Cappela07
View 2 Replies
View Related
Jan 23, 2008
Hi,
I'm having an SSIS package which gives the following error when executed :
Error: 0xC002F210 at Create Linked Server, Execute SQL Task: Executing the query "exec (?)" failed with the following error: "Syntax error or access violation". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.Task failed: Create Linked Server
The package has a single Execute SQL task with the properties listed below :
General Properties
Result Set : None
ConnectionType : OLEDB
Connection : Connected to a Local Database (DB1)
SQLSourceType : Direct Input
SQL Statement : exec(?)
IsQueryStorePro : False
BypassPrepare : False
Parameter Mapping Properties
variableName Direction DataType ParameterName
User::AddLinkSql Input Varchar 0
'AddLinkSql' is a global variable of package scope of type string with the value
Exec sp_AddLinkedServer 'Srv1','','SQLOLEDB.1',@DataSrc='localhost',@catalog ='DB1'
When I try to execute the Query task, it fails with the above error. Also, the above the sql statement cannot be parsed and gives error "The query failed to parse. Syntax or access violation"
I would like to add that the above package was migrated from DTS, where it runs without any error, eventhough
it gives the same parse error message.
I would appreciate if anybody can help me out of this issue by suggeting where the problem is.
Thanks in Advance.
View 12 Replies
View Related
Jan 7, 2004
Hi All, can someone help me,
i've created a stored procedure to make a report by calling it from a website.
I get the message error "241: Syntax error converting datetime from character string" all the time, i tryed some converting things but nothig works, probably it is me that isn't working but i hope someone can help me.
The code i use is:
CREATE proc CP_Cashbox @mID varchar,@startdate datetime,@enddate datetime
as
set dateformat dmy
go
declare @startdate as varchar
declare @enddate as varchar
--print "query aan het uitvoeren"
select sum(moneyout) / sum(moneyin)*100 as cashbox
from dbo.total
where machineID = '@mID' and njdate between '@startdate' and '@enddate'
GO
Thanx in front
Cya
View 14 Replies
View Related
Nov 24, 2004
Hello,
the following alter table statement:
ALTER TABLE [dbo].[CalCalendar]
ALTER COLUMN [OID] uniqueidentifier NOT NULL PRIMARY KEY NONCLUSTERED
is answered with:
Server: Msg 156, Level 15, State 1, Line 2
Incorrect syntax near the keyword 'PRIMARY'.
which I consider to be interesting. Anyone has an idea why? I checked documentation but I do not see an error.
Note that:
ALTER TABLE [dbo].[CalCalendar]
ALTER COLUMN [OID] uniqueidentifier NOT NULL
DOES get executed, and
ALTER TABLE [dbo].[CalCalendar]
ALTER COLUMN [OID] uniqueidentifier NOT NULL PRIMARY KEY
produces the same error.
Now, in my understanding this has nothing to do with an index may already exist etc. - the eror indicates a SYNTAX error, before any checking. Makes no sense to me, though, reading the documentation.
So - anyone an idea?
View 4 Replies
View Related
Aug 1, 2004
Hi,
I'm writing a stored procedure and when I click on the Check Syntax button its giving me the error in the subject. I'm not really sure whats wrong with this. Here is my Stored Procedure code. Any help wud be appreciated.
CREATE PROC CabsSchedule_Insert
{
@JulianDatesmallint,
@SiteCodesmallint,
@CalendarDaysmallint,
@BillPeriodsmallint,
@WorkDaysmallint,
@CalDayBillRcvd varchar(30),
@Remarksvarchar(50)
}
AS
INSERT INTO CabsSchedule
(JulianDate, SiteCode, CalendarDay, BillPeriod, WorkDay, CalDayBillRcvd, Remarks)
VALUES
(@JulianDate, @SiteCode, @CalendarDay, @BillPeriod, @WorkDay, @CalDayBillRcvd, @Remarks)
Thanks,
View 2 Replies
View Related
Feb 12, 2008
Hi all,
I want to learn about sp with examples,so can any one give me the best urls regarding this.and i want to write single sp for all like (insert,delete and update)in a single sp.Please guide me.
Thank You
View 1 Replies
View Related
Aug 27, 2004
Hi
I use the next StoredProcedure in Access, Inserts Users to tblUsers:
INSERT INTO tblUsers ( UserName, Password, RetypePassword, Email, Comments )
VALUES (@UserName, @Password, @RetypePassword, @Email,@Comments);
How do i have to write it in SQL?
Thank's.
View 1 Replies
View Related
Mar 12, 2008
Hi
I am New to Sql Server. Now i have to write two stored procedures.
Here are my requirements. If any one help please.
1)People often ask me to do this as well... change the name of the underwriter. For Mortgage Network underwriters (different than MGIC underwriters) all you need to do is:
Update mnetwork..unw_Nola set underwriter='<underwriters username>' where LoanID='<LoanID>'
So, I need you to write a stored procedure that will do exactly that. If you don't enter a loanID or username, the stored procedure should tell you that it can't complete the task and why. Also, the list of underwriters can be found in:
select LoginName from mnetwork..unw_LoginLookup where UnderwriterName = '<Name on the email>'
So for this one, you would select where underwriterName='John Brennan'.
For most usernames, it's just first initial last name (jbrennan in this case). You can make the stored procedure to both, if you want. If you enter an underwriter name, then it will translate to the loginname. If you enter the login name, it will just use that. You don't have to do all of that if you don't want. Just make sure the procedure verifies that the username is correct (in the table) and that is enough.
Tables for this storedprocedure:
Table Name:mnetwork..unw_Nola
Table Fields:LoanID,ConditionSet,Status,Revised,RevisedBy,PDFNOLA,MonthlyIncome,DocExpDate,Notes,
Underwriter,rowguid,ApprovedDate.MovedToCentera,FK_UserID,RecordDate
TablName:mnetwork..unw_LoginLookup
Table Fields: [LoginLookupID], [LoginName], [UnderwriterName], [FirstName], [LastName], [Title], [Signature], [Address1], [Address2], [Addr1], [Addr2], [City], [State], [Zip], [Phone], [Phone2], [Fax], [Email], [DefaultSet], [rowguid], [FK_UserID], [RecordDate], [Createdby], [LastUpdated], [UpdatedBy]
2)1. Block this loan
2. Grant me access to this blocked loan.
So, I need you to write either one or two stored procedures that will accomplish the following:
When a loan needs to be blocked, it needs to be added to the mnetwork..sec_BlockedLoans table
When a person needs access to that loan, their username needs to be added to the mnetwork..sec_LoanAccess table.
Tables:
1) SELECT [LoanID], [Username], [Grantor], [GrantDate] FROM [mnetwork].[dbo].[sec_LoanAccess]
2) SELECT [LoanID], [Added] FROM [mnetwork].[dbo].[sec_BlockedLoans
any one can help to write these stored procedure.
Thanks,
JT
View 1 Replies
View Related
Mar 22, 2006
Hello,
we have automated build on every night. In our solution is SSIS project, where each package is encrypted per password. We call build process per command line like this..
C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (c:DevelopmentX3\X3.sln /build Release)' in 'c:DevelopmentProjectsDailyBuild
Through build process we get a error:
External Program Failed: C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (return code was 1):
We think a reason is, that on build of SSIS project must be entered a password. You can wonder for what we need that SSIS packages are part of our build. We hope that on build process is also created Deployment Utility, if so set in dtproject.user. Is it so? Is there any way to create Deployment utility on automated build process? Can be a password provided pre command line?
with best regards
Anton Kalcik
View 5 Replies
View Related
Jun 27, 2006
I am using SQL Server 2005 now and I have a table with following columns.
ID, FirstName, LastName, Email
"ID" is the primary key (int) and is set auto generated (1 increment)
I have a StoredProcedure to insert a new record.
CREATE PROCEDURE Candidate_Create @FName nvarchar(255), @LName nvarchar(255), @Email nvarchar(255)ASINSERT INTO Candidate (FirstName, LastName, Email)VALUES (@FName, @LName, @Email)GO
I want the ID to be returned as the same time when a new record is inserted, how can I do it ? Is it possible ?
View 3 Replies
View Related
Aug 22, 2007
Hi,I'm wodering if it's possible (and the correct syntax) to make a JOIN between a Table and a SP's result. This is my code, but it goes in error in the EXEC:1 SET ANSI_NULLS ON
2 GO
3 SET QUOTED_IDENTIFIER ON
4 GO
5 -- =============================================
6 -- Author:Luca de Angelis
7 -- Create date: 22/08/2007
8 -- Description:Inserimento dei dati contabili nella tabella di log
9 -- =============================================
10 CREATE PROCEDURE dbo.InsertIntoLog_dati_contabili
11 -- Add the parameters for the stored procedure here
12 @id_gestore tinyint
13 AS
14 SET NOCOUNT ON
15 BEGIN TRANSACTION
16 INSERT INTO CEL_log_dati_contabili(numero_telefonico, anno, mese, id_gestore, id_tipo_log)
17 SELECT CEL_traffico_temp.numero_telefonico
18 , CEL_traffico_temp.anno
19 , CEL_traffico_temp.mese
20 , @id_gestore as id_gestore
21 , 1
22 FROM CEL_traffico_temp
23 INNER JOIN
24 (EXEC dbo.CEL_SimConGestoreNoFilePeriodo @id_gestore, CEL_traffico_temp.anno + CEL_traffico_temp.mese) AS tabella
25 ON CEL_traffico_temp.numero_telefonico = tabella.numero_telefonico
26
27 INSERT INTO CEL_log_dati_contabili(numero_telefonico, anno, mese, id_gestore, id_tipo_log)
28 SELECT CEL_traffico_temp.numero_telefonico
29 , CEL_traffico_temp.anno
30 , CEL_traffico_temp.mese
31 , @id_gestore as id_gestore
32 , 2
33 FROM CEL_traffico_temp
34 INNER JOIN
35 (EXEC CEL_SimNelFileNoGestore @id_gestore) AS tabella
36 ON CEL_traffico_temp.numero_telefonico = tabella.numero_telefonico
37
38 INSERT INTO CEL_log_dati_contabili(numero_telefonico, anno, mese, id_gestore, id_tipo_log)
39 SELECT CEL_traffico_temp.numero_telefonico
40 , CEL_traffico_temp.anno
41 , CEL_traffico_temp.mese
42 , @id_gestore as id_gestore
43 , 3
44 FROM CEL_traffico_temp
45 INNER JOIN
46 EXEC CEL_SimNelFileNoUtente @id_gestore AS tabella
47 ON CEL_traffico_temp.numero_telefonico = tabella.numero_telefonico
48
49 IF @@error <> 0
50 BEGIN
51 ROLLBACK TRANSACTION
52 END
53 ELSE
54 BEGIN
55 COMMIT TRANSACTION
56 END
Help me please...
View 2 Replies
View Related
May 14, 2008
Visual Studio 2008 Code VB
I'm trying to create a stored procedure that will update a database table. I want to make sure that duplicate records are not inserted into the Database Table, so I used IF NOT EXISTS . With the below code I can update the table, however, you can not add additional rows to the table.
Could someone tell me what is wrong, or how to fix it?
Thanks! losssoc ALTER PROCEDURE dbo.CaseDataInsert
@ReportType varchar(50),@CreatedBy varchar(50),
@OpenDate smalldatetime,@Territory varchar(10),
@Region varchar(10),@StoreNumber varchar(10),
@StoreAddress varchar(200),@TiplineID varchar(50),
@Status varchar(50),@CaseType varchar(200),
@Offense varchar(200)
AS
BEGIN
IF NOT EXISTS(SELECT ReportType,CreatedBy,OpenDate,Territory,Region,StoreNumber,StoreAddress,TiplineID,Status,CaseType,Offense FROM CaseData)INSERT CaseData(ReportType, CreatedBy,OpenDate,Territory,Region,StoreNumber,StoreAddress,TiplineID,
Status,CaseType,Offense)VALUES(@ReportType,@CreatedBy,@OpenDate,@Territory,@Region,@StoreNumber,@StoreAddress,@TiplineID,
@Status,@CaseType,@Offense)
END
View 12 Replies
View Related
Jun 11, 2005
To all,
I looked at the MS-SQL pubs sample database and execute the example
stored procedure reptq2 and I got 17 results set back. Where can I find
an example using Visual Studio DataGrid or any means to get all these
results from this SP.
Thanks,
Frank
View 3 Replies
View Related
Apr 16, 2006
Hi
public static void ExecuteStoredProcedure(string SPName, ref ArrayList Parameters) { object result=null; ADODB.Connection Connection = new ADODB.Connection(); ADODB.Command Command = new ADODB.Command(); Command.ActiveConnection = Connection; Command.CommandText = SPName; Command.CommandType = CommandTypeEnum.adCmdStoredProc;
if (Parameters != null) { for (int i = 0; i < Parameters.Count; i++) { Command.Parameters.Append(Parameters[i]); } }
try { Connection.Open(ConnectionString, "", "", 0); Command.Execute(out object RecordAffected, ref object parameters, int options ) ;//the second parameter what mean? how set it? } catch (Exception ex) { throw ex; } finally { Connection.Close(); }
}
Thanks
View 2 Replies
View Related
May 8, 2008
Hi,
I want to know how to write stored procedure with parameters. And i want to compare this parameters.
I have DropDownList and RadioButtonList in my Web Application.
How to write Procedure passing this Two control parameters.(DropDown and RadioList).
In RadioButtonList having 5 selections.
If selection 1 happens
-- some condition
if selection2 hapens
-- some condition
similarly 3,4,5
------------------
How to write conditions in storeprocedure.
Please help me i am not having exp on storedprocedure.
Thanks
View 1 Replies
View Related
Mar 23, 2008
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
go
ALTER PROCEDURE [dbo].[usp_CustomerDetails]
(@Number varchar(30),
@Name varchar(30),
@City varchar(20),
@SSN varchar(20),
@CustomerID int)
AS
BEGIN
IF NOT EXISTS (SELECT * FROM CustomerDetails WHERE Name = @Name AND Number = @Number)
BEGIN
UPDATE CustomerDetails SET Number = @Number,Name = @Name,City=@City,SSN = @SSN where CustomerID = @CustomerID
END
ELSE
BEGIN
print 'CANNOT UPDATE'
END
END
This my storedproc.
My problem is when i select customerID = 1 to update and if the same row having name = @name and number =@number
Then the update should take place.
but if any other row other than CustomerID=1 having name=@name and number=@number
Then the update is should not take place.
but The above stored procedure is not working like that.
so please some one help me with this.
Thankyou
Ramya.
View 4 Replies
View Related
May 11, 2008
Hello ,
When I read about Stored Procedure , I read this Topic
"
First, after SQL Server parses and compiles a stored procedure, it caches
the execution plans in its procedure cache.
I want to know what does it mean about ProcedureCache ??????
another question is :
what is the situations when SqlServer doesnot resuse the StoredProcedure in the ProcedureCache and it must recomplie it again ???
thanks
View 4 Replies
View Related