Quantcast
Channel: SQL Server Data Access forum
Viewing all 4164 articles
Browse latest View live

The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.

$
0
0
Hi,

I am importing Excel 2007 file into SqlServer 2005 (Sqlexpress). The office 2007 is not installed in the machine. I have downloaded and installed "AccessDatabaseEngine". When I execute following statement

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\File1.xlsx', 'SELECT * FROM [Sheet1$]');

The following error is comming:

Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" reported an error. Access denied.
Msg 7350, Level 16, State 2, Line 1
Cannot get the column information from OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)".

Can any one suggest what should I do to resolve?

Thanks,
Parmeshthee.


Learning .Net 3.5

Some times on Tomcat start up it creates SSL error while JDBC connection to SQL server

$
0
0

We are using Apache Tomcat 6 and SQL server 2008 on production. In the application in ServletContextListner we make DB connection to read some property from DB. When we restart the Tomcat 6.0 in that case sometimes it does not gets DB connection till 5 to 10 minutes. It does not happen every time. We are using JNDI for getting the Datasource objectand using SQL JDBC 3.0 driver. We get following error in log

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1225)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at com.rightwave.util.RWDBConnectionManager.getConnection(RWDBConnectionManager.java:145)
at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:306)
at com.rightwave.util.RWDataBaseDAO.executeQuery(RWDataBaseDAO.java:289)
at com.rightwave.admin.RWApplicationContext.setMConfigurationProperties(RWApplicationContext.java:226)
at com.rightwave.admin.RWAdminApplicationContext.initialize(RWAdminApplicationContext.java:85)
at com.rightwave.admin.RWServletContextListener.contextInitialized(RWServletContextListener.java:186)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:627)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Connection reset by peer: socket write error".
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1368)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1412)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1058)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:833)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:716)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:841)
at org.apache.tomcat.dbcp.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
at org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:294)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1247)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1221)
... 31 more
Caused by: java.io.IOException: Connection reset by peer: socket write error
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:500)
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:570)
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:562)
at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:757)
at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:745)
at com.sun.net.ssl.internal.ssl.InputRecord.readFully(Unknown Source)
at com.sun.net.ssl.internal.ssl.InputRecord.read(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1379)
... 39 more

Urgent help will be appreciated. 


Named Pipes Provider, error: 40 on workgroup workstations

$
0
0

I am having issues with a vendor supplied application. It generates an error when run from workstations that are not part of an Active Directory domain. The error is “provider: Named Pipes Provider, error: 40 – Could not open a connection to SQL Server)”. It runs as expected when ran from a workstation that is a member of the domain. Obviously adding the workstation to the domain is a solution. However, because of concern of what might break this is not our preferred solution.

The database is SQL Server 2008 on a 2008R2 system that is a member server of a domain. The systems that are having the error are workgroup systems running Windows 7. Except for the final step, I have pretty much eliminated the other possibilities in Steps to troubleshoot SQL connectivity issues. That, and the fact that the application successfully runs from a workstation that is a member of the domain lead me to believe it is an account/authentication issue on the workstation.

From what I have determined SQL authentication is required in this scenario and I have confirmed that the database server is configured for Windows and SQL Server authentication. I have also examined the configuration file the application uses. It contains the user name and password for the account. Are these credentials not used to establish a connection?

The only thing I can think of, which I haven’t tested because 1) it is a production system and 2) it is a vendor supplied application, is the application needs to be run under a local workstation account with the same credentials as the SQL Server account.

Could this be the case or is there something else I should be look at?

Thanks in advance.

Can not connect to SQL Server after disabling TLS 1.0 on Windows 2008 RC2

$
0
0

I'm configuring my server to accept TLS 1.1 and higher for SSL connections. When I disable TLS 1.0 on the server, however, I can no longer connect to the SQL Server 2008 instance on that server, either through a web app running on that server or using SQL Management Studio. The message is:

"A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)

When I re-enable TLS 1.0, I can connect again.

SQL Server is not configured to force SSL, so I'm not sure what's the connection here. Any ideas what is using TLS 1.0, and how I can remove that dependency, or upgrade it to TLS 1.1 or higher? 

Thanks,
Sean

Linux Server Database

$
0
0
I am not sure if this would be the right spot to do this. I am wanting to know. How if possible can I connect a Linux Server to my project in VS 2013 C# WPF and then allow a ODBC connection so I can see all my tables and stuff under the Data Connections? If I can't then can you tell me away to get a database connection with one that is on a Linux Server.

Please Help me with this issue , this error coming, tell me how to fixx it, (i have created a form as like this and that form didn't show any error , working well, but this form showing error, why is that?)

$
0
0
System.InvalidOperationException was unhandled
  HResult=-2146233079
  Message=Update requires a valid DeleteCommand when passed DataRow collection with deleted rows.
  Source=Class Managment System
  StackTrace:
       at Class_Managment_System.term1DataSet1TableAdapters.TableAdapterManager.UpdateAll(term1DataSet1 dataSet) in c:\Users\mohamed.rifkan\Documents\Visual Studio 2012\Projects\Class Managment System\Class Managment System\term1DataSet1.Designer.cs:line 1640
       at Class_Managment_System.term1.button2_Click(Object sender, EventArgs e) in c:\Users\mohamed.rifkan\Documents\Visual Studio 2012\Projects\Class Managment System\Class Managment System\term1.cs:line 73
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at Class_Managment_System.marks.button1_Click(Object sender, EventArgs e) in c:\Users\mohamed.rifkan\Documents\Visual Studio 2012\Projects\Class Managment System\Class Managment System\marks.cs:line 31
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at Class_Managment_System.Form1.button2_Click(Object sender, EventArgs e) in c:\Users\mohamed.rifkan\Documents\Visual Studio 2012\Projects\Class Managment System\Class Managment System\Form1.cs:line 52
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(Form mainForm)
       at Class_Managment_System.Program.Main() in c:\Users\mohamed.rifkan\Documents\Visual Studio 2012\Projects\Class Managment System\Class Managment System\Program.cs:line 19
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:

Unable to connect to Sharepoint SQL server from MS Access

$
0
0

I'm working on a Sharepoint site containing an MS Access web application. The application is called ARS. I'd like to create an MS Access database file which links to the ARS database, so that users can use the database file to interact with the ARS data.

I understand that an MS Access web application is backed by an MS SQL Server database. Using MS Access, I've configured the web application to allow read-write access from anywhere. I am able to use SQL Server Management Studio to connect to the ARS database; I just have to ask MS Access for the SQL Server connection information and copy this information (including the database name--I can't connect without specifying a database) into the SSMS connection dialog.

If I understand correctly, here's how I'm supposed to link an MS Access database file to the SQL Server database. Opening the MS Access database file, I go to the External Data tab and click "ODBC Database", and select the option to create a linked table. I'm prompted for a DSN file; since I don't have one of those, I click the "New" button and select the SQL Server Native Client 11.0 driver. I enter the server name, username, and password; when I enter the username, I append an at sign followed by the first component of the server's domain name. (The error message I eventually get is the same if I don't append these things.) I check the "Change the default database to" box and enter the database name; I leave all the other settings unchanged. Finally, I click the "Finish" button.

This doesn't work, however. I get the following error message:

Connection failed:
SQLState: '28000'
SQL Server Error: 18456
[Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'db_[...]_ExternalWriter'.
Connection failed:
SQLState: '01000'
SQL Server Error: 40608
[Microsoft][SQL Server Native Client 11.0][SQL Server]This session has been assigned a tracing ID of '[...]'. Provide this tracing ID to customer support when you need assistance.

I don't know why the login would succeed in SSMS but fail in MS Access. I'm using the same server name, username, password, and database name in both places.

Using the "Report on my Data" feature of the MS Access web application, I am able to create a database file which successfully connects to the SQL Server database, but (as the description of the feature states) this is a read-only connection, and there's no obvious way to change it to a read-write connection. If I were able to somehow extract a DSN file from the read-only database file, presumably I would be able to modify it so that it can be used for both reading and writing.

I don't seem to be able to access the SQL Server error logs through SSMS using the credentials that the MS Access web application gave me. I can connect to the database and run queries on it, but if I attempt to expand the Management folder, I get the following message:

Failed to connect to server . (Microsoft.SqlServer.ConnectionInfo)

ADDITIONAL INFORMATION:

Cannot open server '[...]' requested by the login. Client with IP address '[...]' is not allowed to access the server.  To enable access, use the Windows Azure Management Portal or run sp_set_firewall_rule on the master database to create a firewall rule for this IP address or address range.  It may take up to five minutes for this change to take effect.
Login failed for user 'db_[...]_ExternalWriter'.
This session has been assigned a tracing ID of '[...]'.  Provide this tracing ID to customer support when you need assistance. (Microsoft SQL Server, Error: 40615)

Multiple Queries in one result set

$
0
0

I have 3 queries from one table, I want to bring all into one result set.

select prj_code, sum(bdgt_eff) effort, sum(bdgt_cost) cost from prj_rev_bdgt_detail group by prj_code

select prj_code, sum(bdgt_eff) effort01, sum(bdgt_cost) cost01 from prj_rev_bdgt_detail
where rev_type_code = '01'
group by prj_code

select prj_code, sum(bdgt_eff) effort01, sum(bdgt_cost) cost01 from prj_rev_bdgt_detail
where rev_type_code in ('02', '03')
group by prj_code

can some one help


Year

$
0
0
I need to change the year on a database, example: 2013 to the year 2014, when i use Powershell on the database it also changes the computer date and time.

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

$
0
0

I've seen many people with this problem but none gave code relevant to mine that I have seen so, can someone help?

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

keeps happening. Also i know that admin is the Uid and there is no password.

Also, this is in Visual Basic

Code :

 '  Dim strPath2 As String = Driver={MicrosoftAccessDriver (.mdb, VBgameDatabase.accdb)} & <Dbq>=.....\VBgameDatabase.accdb & Uid =Admin & Pwd=</Dbq>}
        Dim strPath2 As String = "Provider=Microsoft.ACE.OLEDB.12.0;" & _
            "Data Source=C:\Users\360805054\Desktop\VBgameDatabase.accdb;"
        Dim strPath3 As String = "Driver={Microsoft Access Driver (Table1.mdb, VBgameDatabase.accdb)};Dbq=C:\Users\360805054\Desktop\VBgameDatabase.accdb; Uid=Admin;Pwd="
        Dim strPath As String = "Driver={Microsoft Access Driver (Table1.mdb, VBgameDatabase.accdb)};Dbq=C:\Users\360805054\Desktop\VBgameDatabase.accdb; Uid=WCS18137;Pwd="
        Dim Connection2 As New System.Data.Odbc.OdbcConnection(strPath3)
        Connection2.Open()
        Dim cmd As OdbcCommand = New OdbcCommand("INSERT INTO Table1 " & _
           "(Slot, Health, Gold, Level, Strength, Vitality, Agility, XP) " & _
           "VALUES (?, ?, ?, ?, ?, ?, ?, ?)", Connection2)

        ' MISSING PARAMETER FOR SLOT FIELD 
        ' cmd.Parameters.Add("@Slot", ......)
        cmd.Parameters.Add("@Slot", OdbcType.VarChar, 255).Value = 1
        cmd.Parameters.Add("@Health", OdbcType.VarChar, 255).Value = Battle.lblPlayerHealth.Text
        cmd.Parameters.Add("@Gold", OdbcType.VarChar, 255).Value = Inventory.lblMoney.Text
        cmd.Parameters.Add("@Level", OdbcType.VarChar, 255).Value = Inventory.lblLevel.Text
        cmd.Parameters.Add("@Strength", OdbcType.VarChar, 255).Value = Stats.lblStrength.Text
        cmd.Parameters.Add("@Vitality", OdbcType.VarChar, 255).Value = Stats.lblVitality.Text
        cmd.Parameters.Add("@Agility", OdbcType.VarChar, 255).Value = Stats.lblAgility.Text
        cmd.Parameters.Add("@XP", OdbcType.VarChar, 255).Value = Inventory.lblXP.Text
        cmd.ExecuteNonQuery()
        Connection2.Close()

Delay when starting accdb without local Admin rights.

$
0
0

Hi,

I have a problem with one application, the front end of the application is MS Access DB that's connects to our SQL Server over odbc driver If the user is in a local administrator group everything is working fast. When the same user is put in the user group without Administrative rights I recive a delay for about 60 sec then the error pops up

After I hit ok a new SQL login pops up and I just press second time ok and the application starts without entering any user and pass. This is not happening if the user is in the built in Administrators Group.

Thanks for the help

fract

Database is stuck in Restore after copy

$
0
0
I attempted to use SQL Management studio to create a copy of a database.  The copy failed and now the original database is stuck in recovery mode.  I do not know what to do to get it out of recovery mode in SQL Managment Studio.  I did not try to restore to the original database, so I'm not sure why that one went into restore mode.  I do have a backup form 1am, but I really don't want to lose data from earlier today.  Is there anything I can do?

SQL Native Client on Windows 2012 R2?

$
0
0

I tried to install the SQL Native Client 2012 on a Windows 2012 R2 box and it failed with a message saying that it is not supported on that OS.  Is there a version of SQL Native Client for Windows 2012 R2?  If not, is there a work around?

Thanks

Bert

Linked servers to many sqlite databases

$
0
0
I have around 600 sqlite databases and I have to be able to access them in sql server. I can create a linked server for anyone of these database and access data that way. But what should be the approach to be able to access the data (read-only) in all of these databases? Please don't suggest data copy :)

sql delete record where duplicate in part of raw

$
0
0

in sql table  i need to delete all record where the time between it  1 or 2 minute or the same and must be the same id but keep the firest record


    ID             Time                            SN   SD   WE    FW
    10    2014-06-30 19:17:37.000    I    0    100    0
    10    2014-06-30 19:17:42.000    I    0    100    0
    10    2014-06-30 19:17:46.000    I    0    100    0
    10    2014-06-30 19:17:58.000    I    0    100    0
    10    2014-06-30 20:37:46.000    I    0    100    0



or
     ID             Time                            SN   SD   WE    FW
    10    2014-07-01 21:10:33.000    I    0    100    0
    10    2014-07-01 21:11:06.000    O    0    100    0
    10    2014-07-02 20:53:36.000    I    0    100    0
    10    2014-07-02 20:53:38.000    I    0    100    0
    10    2014-07-02 20:54:33.000    O    0    100    0
    10    2014-07-02 20:54:41.000    O    0    100    0
    10    2014-07-02 20:55:22.000    o    0    100    0


to be



    ID             Time                            SN   SD   WE    FW
    10    2014-06-30 19:17:37.000    I    0    100    0
    10    2014-06-30 20:37:46.000    I    0    100    0

and

    ID             Time                            SN   SD   WE    FW
    10    2014-07-01 21:10:33.000    I    0    100    0
    10    2014-07-02 20:53:36.000    I    0    100    0

 


data transfer

$
0
0

Hi Guys 

      im having some issues regarding data transfer.

scenario: i have a sql server and web app installed both in a totally different network (to be more informative sql server server in US and web app in Europe something like that). im accessing my data into sql server using an http ( basically using internet access)  the problem occurs really when data is transfer from sqlserver to webapp i think something causing the delay or is it the orm itself the problem.  how do i make it much lightweight in terms of transferring using http layer or using internet access?

thanks and godbless


auwi

Error 0xc001f205 trying to import .accdb into database

$
0
0

All, been trying to import a .accdb file into MS SQL 2008 and I get the following error

- Setting Source Connection (Error)
Messages
Error 0xc001f205: SSIS.Pipeline: Object name "Source - UNMATCHED  ALL Budget Data FY08 Without Matching SCEA BUDGET " is not valid. Name cannot end with a whitespace.
 (SQL Server Import and Export Wizard)

Exception from HRESULT: 0xC001F011 (Microsoft.SqlServer.DTSPipelineWrap)
 
I can where the whitespace is but it won't let me edit the source destination.

Returning an output parmeter from a Stored Procedure

$
0
0

I have a simple stored Procedure that looks like the following:

USE [Test]
GO
/****** Object:  StoredProcedure [dbo].[ShowCustomers]    Script Date: 10/16/2014 07:17:44 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
ALTER PROCEDURE [dbo].[ShowCustomers]
	-- Add the parameters for the stored procedure here
	@CustNum Int,
	@Result Int Output
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
	SELECT * FROM Orders join CustemerOrders on CustmerID = @CustNum
	SET @Result = @CustNum
END
The issue is that @Result is always returning a value of 0!


- Eric www.my-msi.net/Admin

ODBC connection failed (SQL Server Native Client)

$
0
0

Dear ..

I tried to connect to ODBC with SQL Server Native Client 11.0.

It successfully connected in SQL mgmt studio : (LocalDB)\AAA

but when I tried to connect to ODBC, it's failed like below..

[Microsoft][SQL Server Native Client 11.0][SQL Server]Login failed for user 'KKIKKI\Jinsu'.
[Microsoft][SQL Server Native Client 11.0][SQL Server]Cannot open database "MAPDB" requested by the login. The login failed.

test failed.

How to initialize all of my SQL Native Client and ODBC configuration?
I tried to remove all SQL application, but it's same situation.. Please help..


jinsu

automatically populating a username field in a table from database after logging in

$
0
0

Howdy. I have an ASP.Net 4.5 web project using VS 2013 Pro Update 3, C#, Code First, EF6. I am using the built in membership system. My users login w/ their email address. On my login form, I also have a "username" field which is optional. It is only needed if a user wants to post to a "Comments" page. Users must be logged in to post a comment. My question is-- using code first, how can I automatically have the "username" field populated from the database after the user has logged in with his email address. I don't want the users email address to appear on the comments page for anyone to see. Does anyone know of a tutorial that will point me in the right direction. I'm struggling with this.  Thanks!  Jeff

Viewing all 4164 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>