Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 1, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 2, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 3, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 4, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 5, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 6, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 7, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 8, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 9, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 10, column 6 (ElectionPct).
Msg 4864, Level 16, State 1, Procedure usp_LoadASC, Line 138
Bulk load data conversion error (type mismatch or invalid character for the specified codepage) for row 11, column 6 (ElectionPct).
Msg 4865, Level 16, State 1, Procedure usp_LoadASC, Line 138
Cannot bulk load because the maximum number of errors (10) was exceeded.
Msg 7399, Level 16, State 1, Procedure usp_LoadASC, Line 138
The OLE DB provider "BULK" for linked server "(null)" reported an error. The provider did not give any information about the error.
Msg 7330, Level 16, State 2, Procedure usp_LoadASC, Line 138
Cannot fetch a row from OLE DB provider "BULK" for linked server "(null)".
I have a stored procedure thats loads data into the sql server thru a text file...but i am getting this error since i moved it to sql server 2005 from 2000. Yest i was getting an xp_cmdshell error but when to the configuration and checked the xp_cmdshell and now i am getting this error..
heres my code behind in UploadImage.aspx.vb _____________________________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationImports System.IOPartial Class UploadImage Inherits System.Web.UI.Page Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim conn As New SqlConnection Dim comm As New SqlCommand Dim connStr As String connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString conn = New SqlConnection(connStr) comm = New SqlCommand("Insert into TImage (CategoryName,Picture,MimeType) VALUES (@name,@pic,@type)", conn) 'gi convert and image to byte array Dim data(FileUpload1.PostedFile.ContentLength - 1) As Byte FileUpload1.PostedFile.InputStream.Read(data, 0, FileUpload1.PostedFile.ContentLength) comm.Parameters.Add("name", System.Data.SqlDbType.Text) comm.Parameters("name").Value = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName).ToLower comm.Parameters.Add("pic", System.Data.SqlDbType.Image) comm.Parameters("pic").Value = data comm.Parameters.Add("type", System.Data.SqlDbType.NChar) comm.Parameters("type").Value = FileUpload1.PostedFile.ContentType If FileUpload1.HasFile = True Then Try conn.Open() comm.ExecuteScalar() Label1.Text = "Successfully uploaded" conn.Close() Finally End Try End If End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click Server.Transfer("image.aspx") End SubEnd Class______________________________________________________________________________________________________________________________then here my code behind in Image.aspx.vb________________________________________________________________________________________________________Imports System.Data.SqlClientImports System.ConfigurationPartial Class image Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim conn As New SqlConnection Dim comm As New SqlCommand Dim connStr As String Dim reader As SqlDataReader Dim dataBuffer() As Byte connStr = ConfigurationManager.ConnectionStrings("TESDA").ConnectionString conn = New SqlConnection(connStr) comm = New SqlCommand("Select * from TImage where no = @no", conn) comm.Parameters.Add("no", System.Data.SqlDbType.Int) comm.Parameters("no").Value = 5 conn.Open() reader = comm.ExecuteReader reader.Read() Response.Clear() Response.AddHeader("Content-type", reader("CategoryName")) Response.AddHeader("Content-type", reader("MimeType")) Dim blen As Integer = CType(reader("picture"), Byte()).Length dataBuffer = reader("Picture") Response.OutputStream.Write(dataBuffer, 0, blen) Response.Close() conn.Close() End SubEnd Class_____________________________________________________________________________________________________________________ When I am going to call the Image.aspx it always prompt this error:XML Parsing Error: no element foundLocation: http://localhost:4730/tesdaweb/UploadImage.aspxLine Number 1, Column 1:Is there something wrong in my codes... Please helpthanks...
Error converting data type varchar to numeric. All the TotAct are varchars in my data base.. and i want to convert it to Decimal so that i add or subract things in the reprot... I tried doing
Cast(TotAct1 as decimal(19,4)) but it doesnt let me do it ,
Code Block Insert into @tbl SELECT pf.ParticipantId, pf.PortfolioId, PortfolioName, pf.FundId LoanFundId, CASE When FundName Is Null Then ShortName ELSE FundName END as FundNames, Act1 as Name1, a.Description as NDesc1, TotAct1, Act2 as Name2, b.Description as NDesc2, TotAct2, Act3 as Name3, c.Description as NDesc3, TotAct3, Act4 as Name4, d.Description as NDesc4, TotAct4, Act5 as Name5, e.Description as NDesc5, TotAct5, Act6 as Name6, fi.Description as NDesc6, TotAct6, Act7 as Name7, g.Description as NDesc7, TotAct7, Act8 as Name8, h.Description as NDesc8, TotAct8, Act9 as Name9, i.Description as NDesc9, TotAct9, Act10 as Name10, j.Description as NDesc10, TotAct10, Act11 as Name11, k.Description as NDesc11, TotAct11, Act12 as Name12, l.Description as NDesc12, TotAct12, Act13 as Name13, m.Description as NDesc13, TotAct13, Act14 as Name14, n.Description as NDesc14, TotAct14, Act15 as Name15, o.Description as NDesc15, TotAct15, Act16 as Name16, p1.Description as NDesc16, TotAct16, Act17 as Name17, q.Description as NDesc17, TotAct17, Act18 as Name18, r.Description as NDesc18, TotAct18, Act19 as Name19, s.Description as NDesc19, TotAct19, Act20 as Name20, t.Description as NDesc20, TotAct20
FROM
ParticipantPlanFundBalances1 pf Left Outer JOIN Fund f On f.FundId = pf.FundId LEFT Join PlanPortfolio p On pf.PortfolioId = p.PortfolioId Left outer Join AscActCodes a on pf.Act1 = a.Name left outer Join AscActCodes b on pf.Act2 = b.Name left outer Join AscActCodes c on pf.Act3 = c.Name left outer Join AscActCodes d on pf.Act4 = d.Name left outer Join AscActCodes e on pf.Act5 = e.Name left outer Join AscActCodes fi on pf.Act6 = fi.Name left outer Join AscActCodes g on pf.Act7 = g.Name left outer Join AscActCodes h on pf.Act8 = h.Name left Outer Join AscActCodes i on pf.Act9 = i.Name left Outer Join AscActCodes j on pf.Act10 = j.Name left outer Join AscActCodes k on pf.Act11 = k.Name left outer Join AscActCodes l on pf.Act12 = l.Name left outer Join AscActCodes m on pf.Act13 = m.Name left outer Join AscActCodes n on pf.Act14 = n.Name left outer Join AscActCodes o on pf.Act15 = o.Name left outer Join AscActCodes p1 on pf.Act16 = p1.Name left outer Join AscActCodes q on pf.Act17 = q.Name left outer Join AscActCodes r on pf.Act18 = r.Name left outer Join AscActCodes s on pf.Act19 = s.Name left outer Join AscActCodes t on pf.Act20 = t.Name WHERE pf.FundId <> 0 AND PeriodId = @PeriodId AND pf.PlanId = @PlanId AND ParticipantId = @ParticipantId
I am really not sure what is the error and how should I debug it.
I Have 64bit OS installed. On That, 64bit SQL as well as 32 bit SQL server are installed. I am trying to run packages from SQL Job which lanches the SSIS Packages from 32 bit dtexec. The packages stop running Halfway without any error. That's what the log says. Same time it creates a sql error Dump.
This is the content of DUMP
Microsoft (R) Windows Debugger Version 6.8.0004.0 X86Copyright (c) Microsoft Corporation. All rights reserved.
Loading Dump File [C:Documents and SettingsXXXDesktopSQLDmpr0093.mdmp]User Mini Dump File: Only registers, stack and portions of memory are availableSymbol search path is: *** Invalid ******************************************************************************** Symbol loading may be unreliable without a symbol search path. ** Use .symfix to have the debugger choose a symbol path. ** After setting your symbol path, use .reload to refresh symbol locations. *****************************************************************************Executable search path is: Windows Server 2003 Version 3790 (Service Pack 1) MP (8 procs) Free x86 compatibleProduct: Server, suite: Enterprise TerminalServer SingleUserTSDebug session time: Mon Dec 17 12:00:34.000 2007 (GMT+6)System Uptime: not availableProcess Uptime: 0 days 0:00:10.000...........................................................................................................................................Loading unloaded module list...This dump file has an exception of interest stored in it.The stored exception information can be accessed via .ecxr.(44ec.774): Access violation - code c0000005 (first/second chance not available)eax=00000000 ebx=7d560760 ecx=0908dfb8 edx=0908eec0 esi=00000338 edi=00000000eip=7d61c824 esp=09fbef3c ebp=09fbefa8 iopl=0 nv up ei pl nz na po nccs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00010202Unable to load image C:WINDOWSsystem32tdll.dll, Win32 error 0n2*** WARNING: Unable to verify timestamp for ntdll.dll*** ERROR: Module load completed but symbols could not be loaded for ntdll.dllntdll+0x1c824:7d61c824 c20c00 ret 0Ch
Few days back these packages were running fine with same configuration. Not sure what happend suddenly and every thing stopped working.
I am using SQL DMO SQLSnapshot to create a snapshot of merge replication. While creating the snapshot, an error is thrown which says "Invalid column name 'origin_datasource_id'.
The source table on which that error is thrown has all required columns + 'rowguid' added by merge publication.
i was created one local variable I with string =null in the collection i was selected the FOLDER (images_ForEach) int the Fiels Columns i was choosen (*.gif)
i was created the table(TEMPS)
SN varchar(10) Unchecked SNAME varchar(250) Checked
IN that for each loop i was placed the sql Task controle with the fallowing expression Working Fine
"INSERT INTO TEMPS ( SN,SNAME ) Values ('" + replace(right(@[User::I], 10), ".gif", "") + "','" + @[User::I]+"')"
for example in temp table RCOUNT COLUMN exist like SN varchar(10) Unchecked SNAME varchar(250) Checked
RCOUNT NUMERIC(9)
1) is it require to take the local variable with count init32 then what to do how to increment the values i tried in Variable mapping it THROWS an Error so please rectify the dought
I am working with c# windowsa application. i want to connect to the .sdf file in button click event.I am writing this code
string str= "D:\Program Files\Microsoft Visual Studio 8\SmartDevices\SDK\SQL Server\Mobile\v3.0\Northwind.sdf"; SqlCeConnection cn = new SqlCeConnection(str); cn.Open(); it is not working. I am getting this error
Unable to load DLL 'sqlceme30.dll': The specified module could not be found.
i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.
there are around 22 Variables i am setting to the connection string of the DTSX files.
Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.
Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.
task failed: ArchiveTicketException.
i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx
0xC0017003
-1073647613
DTS_E_PROPERTYEXPRESSIONEVAL
The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.
I have report server in SharePoint integrated mode and the Reporting services runnign under domain account. which is part of dmain adming group as well.but when i try to connect to http:\localhost eportserver
it gives me this error: Reporting Services Error
Report Server has encountered a SharePoint error. (rsSharePointError) Get Online Help
User cannot be found.
SQL Server Reporting Services
and in reporting service log it gives me following information w3wp!webserver!1!8/15/2007-13:40:01:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.SharePointException: Report Server has encountered a SharePoint error. ---> Microsoft.SharePoint.SPException: User cannot be found. at Microsoft.SharePoint.SPUserCollection.GetByID(Int32 id) at Microsoft.SharePoint.SPWeb.get_Author() at Microsoft.ReportingServices.SharePoint.Server.Utility.GetSPWebProperties(SPWeb web) at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.internalFindObjectsNonRecursive(String wssUrl, CatalogItemList& children) at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports) --- End of inner exception stack trace --- at Microsoft.ReportingServices.SharePoint.Server.SharePointDBInterface.FindObjectsNonRecursive(String wssUrl, CatalogItemList& childList, Security secMgr, IPathTranslator pathTranslator, Boolean appendMyReports) at Microsoft.ReportingServices.Library.ListChildrenAction.PerformActionNow() at Microsoft.ReportingServices.Library.RSSoapAction`1.Execute() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderFolder() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderItem(ItemType itemType) at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPageContent() at Microsoft.ReportingServices.WebServer.ReportServiceHttpHandler.RenderPage()
Hi i am trying to implement Multivalue parameter in my report....
So for the Parameter PlanId i have selected multivalue parameter... and the avialable values are from a query...
when i run the report and just check 1 Plan it works fine.. but when i go to check more than one plan.. I get this error
An error has occured duing local report processing. an error has occured during report processing. Query exceution failed for data set Statement. Error converting data type nvarchar to int.
Warning: 0x80019002 at ODS2DMPackage: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (13) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the errors.
Sorry i am posting this again cos my problem is not fixed yet and i set the last reply as answer i don't know if i need to post it again.
i am executing Sql task with a stored proceedure to get values from Database. Which gets the value correctly. The variable value i am trying to set in the connection string through the Expression.
there are around 22 Variables i am setting to the connection string of the DTSX files.
Error: 0xC001401E at DoArchive, Connection manager "ArchiveTicketException.dtsx": The file name "D:TAHOEAPPSSSISPackagesIntegration Services PackagesArchiveTicketException.dtsx " specified in the connection was not valid.
Error: 0xC0017004 at DoArchive: The result of the expression "@[User::TicketExceptionConnSt]" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property.
Error: 0xC00220DE at ArchiveTicketException: Error 0x80070003 while loading package file "". The system cannot find the path specified.
task failed: ArchiveTicketException.
i saw this error in http://msdn2.microsoft.com/en-us/library/ms345164(d=robot).aspx
0xC0017003
-1073647613
DTS_E_PROPERTYEXPRESSIONEVAL
The expression "__" on property "__" cannot be evaluated. Modify the expression to be valid.
How can i rectify this
I get the saem proble again the path and varaible value if correct
I used veritas to backup MsSQL 2000 database server but I often encounter backup fail error due to the deadlock in the database. May I know how to reduce this problem?
I heard there is a method to control the database deadlock timeout. If we set a lock timeoutvalue, will it reduce the chance of deadlock to happen? Is there any disadvantage of doing that?
If I were not wrong , we can set the lock_timeout value using the syntax "SET LOCK_TIMEOUT milliseconds" Is that true? But Do we have to have to run this command for every database? What is the normal milliseconds value?
THIS IS THE ONE.TXT FILE Customer called to complain that the ice maker on her fridge has stopped working model XXYY-3 Door to refrigerator is coming off model XX-1 Ice maker is making a funny noise XXYY-3 Handle on fridge falling off model XXZ-1 Freezer is not getting cold enough XX-1 Ice maker grinding sound fredge XXYY-3 Customer asking how to get the ice maker to work model XXYY-3 Customer complaining about dent in side panel model XXZ-1 Dent in model XXZ-1 Customer wants to exchange because of dent in door model XXZ-1 Handle is wiggling model XXZ-1 Customer happy with us. Best fridge yet!
i created the table term_result(term_id varchar2(50)); ( termid ==xxyy-3 like)
now i want to find the no of times repeat the xxyy-3 posted queries
ERROR : DT_NTXT OR DT_WSTR TYPES ONLY ALLOWS HERE ERROR I AM GETTING SO
Flat File Source-----------> Data Conversion --------->Term Lookup -------->Oledb data source one.txt DT_stR I choosen error occur here
SO WHAT IS THE DATA TYPE I HAVE TO GIVE FOR THAT MATCHING LOOKUP
HI, I HAVE BEEN TRYING TO TRANSFORM AN OLD TABLE TO A NEW FORMAT AND CHANGE SOME OF THE DATATYPE FORMATS USED IN THE OLD ONE. OUT OF WHICH ONE IS A COLUMN CALLED AS FORM_RECEIVE_DATE WHICH HAS NVARCHAR(41) AS DATATYPE IN THE OLD TABLE CREATED BY A PREVIOUS DBA (DON'T KNOW wHY?)
wHILE CONVERTING IT INTO DATATYPE DATETIME , I AM GETTING THIS ERROR :- "Arithmetic overflow error converting expression to data type datetime." i DON'T KNOW WHY
hERE ARE FEW EXAMPLES OF THE DATA CONTAINED IN THE PREVIOUS TABLE :-
Good morning all. I need some help with a stored proc that is driving me up a wall. It's probably something stairing me right in the face but I can't see it!
I keep getting the following error on the procedure that I'm working on: SQL-DMO (ODBC SQLSTATE: 42000) ERROR 156: Incorrect syntax near keyword 'AS' Must declare the variable '@signid' Must declare the variable '@signid'
Here's the code:
CREATE PROCEDURE [dbo].[ws_savesignature2db] @xml as text='', @image as image='', @imageformat as varchar(20)='', @imagename as varchar(40)='', @imagesize as int=0, AS insert into signaturetable ([image], imageformat, imagename, imagesize) values (@image, @imageformat,@imagename,@imagesize)
/* if your XML field datatype is Text or nTEXT, use the code below in Sql Server 2000. If you use Sql Server 2005, you can use varchar(max) or nvarchar(max) which will be much easier and you do not need the code. */ select @signid = @@IDENTITY DECLARE @ptrval binary(16) SELECT @ptrval = TEXTPTR([xml]) FROM ws_signature WHERE signid= @signid if @ptrval is not null WRITETEXT ws_signature.xml @ptrval @xml GO
i need help to solve following error in ssis package when i aun ::
Error: 0xC0047062 at CTPKPF, DataReader Source [1]: System.NullReferenceException: Object reference not set to an instance of an object. at Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPrimeOutput(IDTSManagedComponentWrapper90 wrapper, Int32 outputs, Int32[] outputIDs, IDTSBuffer90[] buffers, IntPtr ppBufferWirePacket) Error: 0xC0047038 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_PRIMEOUTPUTFAILED. The PrimeOutput method on component "DataReader Source" (1) returned error code 0x80004003. The component returned a failure code when the pipeline engine called PrimeOutput(). The meaning of the failure code is defined by the component, but the error is fatal and the pipeline stopped executing. There may be error messages posted before this with more information about the failure. Error: 0xC0047021 at CTPKPF, DTS.Pipeline: SSIS Error Code DTS_E_THREADFAILED. Thread "SourceThread0" has exited with error code 0xC0047038. There may be error messages posted before this with more information on why the thread has exited. Information: 0x40043008 at CTPKPF, DTS.Pipeline: Post Execute phase is beginning. Information: 0x40043009 at CTPKPF, DTS.Pipeline: Cleanup phase is beginning. Information: 0x4004300B at CTPKPF, DTS.Pipeline: "component "OLE DB Destination" (1993)" wrote 0 rows. Task failed: CTPKPF
I get this error when i try to connect with my sql, I created my SQL with MS SQL 2005 Workgroup,
the error is:
Server Error in '/' Application.
The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Configuration.Provider.ProviderException: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
When i used MySql in my appliaction its working well, but now i shifted my web application on SQL Server2000 , its gives problem. It gives this error at runtime... The specified module could not be found. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.IO.FileNotFoundException: The specified module could not be found.Source Error:
Line 79: SqlCommand OcCom=new SqlCommand(Query,OdCon); Line 80: SqlDataReader OdDat; Line 81: OdCon.Open(); Line 82: OdDat=OcCom.ExecuteReader(CommandBehavior.CloseConnection); Line 83: return OdDat;
i read ths stuff from all over and reinstall the Visual studio .NET2003 again . but still some is not solved. So Pls help Me!!!!!!!!!!!!!! Thanx Manish
Lets say I want to delete a record in tableA. tableA has 5 foreign key tables.
Before I delete the row in tableA, I want to make sure I dont get any foreign key violation error. I dont want to make a cascading delete, since the record should not be deleted if it has child records.
Of course I could check all those tables before the delete. Anybody know of a better approach?
hi I have a question: why when we call a stored procedure in delphi that the return in Null (Example Not Match data with our Select) Error occured? Please help me . thanks alot.bye.
hi, i have a doubt whether constraints(for eg:default constraint ) can be applied on table variable or not. plz let me know. iam presenting the table variable which iam using.
declare @t table (a int constraint d default 1 ,b varchar(10) constraint a default 'india' ) insert into @t values ( 1,'ic')
I'm a beginer! I host my web on a hosting service provider. But when I access an error occur:
Server Error in '/' Application.
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: 26 - Error Locating Server/Instance Specified) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: 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: 26 - Error Locating Server/Instance Specified)Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException (0x80131904): 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: 26 - Error Locating Server/Instance Specified)] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734867 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Connect(Boolean& useFailoverPartner, Boolean& failoverDemandDone, String host, String failoverPartner, String protocol, SqlInternalConnectionTds connHandler, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject, Boolean aliasLookup) +820 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +628 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +130 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +424 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +496 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +82 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105 System.Data.SqlClient.SqlConnection.Open() +111 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.DetailsView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.DetailsView.EnsureDataBound() +181 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
Hi,there are three tables:1) department---------------ID (primary key)name2) reports----------ID (p. key)depIDuserID3) users--------ID (p.key)nameI want to get in one query how many distinct users have made a report for each department.E.g.: table reports may look like this:ID depID userID1 1 12 1 13 1 34 3 65 4 8This gives:for dep 1: 2 distinct usersfor dep 2: 0for dep 3: 1 distinct userfor dep 4: 1 distinct userThanks for helpTartuffe
Hi, I am trying to update my table... but when i try to save my query.. i am getting the following error Column 'SourceDBF.DEFPCT' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. This is my sproc...
UPDATE Statements..ParticipantSourceSummary SET DeferralPct = DEFPCT, BeginingBal = BEGBAL, Deposits = DEPOSITS, Withdraw = WITHDRAW, GainLoss = GAINLOSS, Others = OTHER, EndingBal = ENDBALANCE, VestPercent = VESTPCT, VestBal = VESTBALANC FROM Statements..ParticipantSourceSummary ps Join ( SELECT p.ParticipantId, cp.PlanId, cs.SourceId, @PeriodId PeriodId, s.DEFPCT, s.BEGBAL, s.DEPOSITS, s.WITHDRAW, s.GAINLOSS, s.OTHER, s.ENDBALANCE, s.VESTPCT, s.VESTBALANC FROM SourceDBF s INNER JOIN Statements..ClientPlan cp ON s.PLAN_NUM = cp.ClientPlanId INNER JOIN Statements..ClientSources cs ON s.SOURCE_NUM = cs.ClientSourceId and cs.ClientId = @ClientId Inner Join Statements..Participant p on s.PART_ID = p.SSN Where s.Import = 1 GROUP BY p.ParticipantId, cp.PlanId, cs.SourceId ) s ONps.ParticipantId = s.ParticipantId AND ps.PlanId = s.PlanId AND ps.SourceId = s.SourceId AND ps.PeriodId = s.PeriodId any help will be appreciated.RegardsKaren
Hi all i have a problem in my stored procedureUSE [eLocalize_System] GO /****** Object: StoredProcedure [dbo].[Insert_Branch] Script Date: 05/15/2008 16:03:23 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,,> -- =============================================ALTER PROCEDURE [dbo].[Insert_Branch] ( @Building_No int ,@Street_Name nvarchar(50) ,@City nvarchar(50) ,@Postal_Code nvarchar(50) ,@Telephone nvarchar(50) ,@Fax nvarchar(50) ,@Client_Id int ,@Country_Id int ,@Row int output) AS Declare @BranchCode int, @Branch_Name nvarchar(50) set @BranchCode=isnull((select Max(BranchCode) from dbo.Branch where Client_Id=(select Id from dbo.Client where Id=@Client_Id)),0); set @BranchCode=@BranchCode+1 set @Branch_Name=(select City from dbo.Branch)+'+'+(select Name from dbo.Country where Id=(select Country_Id from dbo.Branch))INSERT INTO [eLocalize_System].[dbo].[Branch] ([Branch_Name],[BranchCode] ,[Building_No],[Street_Name] ,[City],[Postal_Code] ,[Telephone],[Fax] ,[Client_Id] ,[Country_Id]) VALUES (@Branch_Name,@BranchCode , @Building_No ,@Street_Name ,@City ,@Postal_Code ,@Telephone ,@Fax ,@Client_Id ,@Country_Id) set @Row = (select scope_identity()) return @Row i want Branch_Name = City + Country and how i do it if there is any update Thanks for help
Subscriptions were created successfully at the following Subscribers: SERVER330
SQL Server Enterprise Manager could not start the service 'MSDTC' on server 'SERVER330'.
5 - (Access is denied)
The subscription at Subscriber 'SERVER330' cannot be initialized immediately because the snapshot for this publication is not yet available. To initialize the subscription, start the Distribution Agent after the snapshot is available.
insert into trial_sales values(111,'11/01/2005',10000,'GAS') insert into trial_sales values(111,'11/02/2005',1000,'GAS') insert into trial_sales values(111,'11/02/2005',20000,'DSL') insert into trial_sales values(222,'11/01/2005',10000,'GAS') insert into trial_sales values(222,'11/02/2005',10000,'DSL') insert into trial_sales values(111,'11/15/2005',1000,'GAS') insert into trial_sales values(222,'11/15/2005',10000,'DSL') insert into trial_sales values(111,'11/25/2005',1000,'GAS') insert into trial_sales values(222,'11/25/2005',10000,'DSL')
Task 3 Display unique values
Display unique values in
create table t (colA varchar(25))
insert into t values('apple') insert into t values('bat') insert into t values('car')
ouput required:
a b c e l p r t
Task : 4
I have a table in the database I am working with with the following columns: (I have simplified this down for the sake of clarity) int p1 int p2 int p3 int s1 date d1 string s1
There is no primary key and the table more resembles a log than anything. e.g.
What I want to do is exttract the rows from the table where the combination of p1 p2 and p3 is distinct/unique and the date is the most recent one for all combinations of p1, p2, p3. So from the table above I would end up with the resultset:
say i have the following data... uId(int PK), productcode(int), quantity(int) 1,12,5 2,12,3 3,12,5 4,11,9
....and i have an order for productcode 12 with quantity of 6 products. i need to select only enough rows to reach a quantity of 6. in this case, i would want the first two rows which would give me a sum of 8. how can i do this without looping through each record, getting the quantity and exiting the loop when i have a sum >= 6?
The ID of TALBE1 is the primary key and the ID of TABLE2 is the foreign key. What's the right T-SQL JOIN statement when I pass the date of 2005/8/7, it will return the result as below:
create table sample_judge( judge_namevarchar(50)) go
insert into sample_judge values ('J Smith') insert into sample_judge values ('M Samuel') insert into sample_judge values ('S Shan') insert into sample_judge values ('K Anand') insert into sample_judge values ('K K K K Anand') insert into sample_judge values ('K R Shanth Anand') insert into sample_judge values ('K R Shanth Anand Kumara Velu')
go
Expected Output :
Smith J Samuel M Shan S Anand K Anand K K K K Shanth Anand K R Shanth Anand Kumara Velu K R