Showing posts with label sql2005. Show all posts
Showing posts with label sql2005. Show all posts

Friday, March 30, 2012

Problem in importing data from excel to sql2005

Hi
I have to import data from a number of excel files to corresponding tables in SQL 2005. The excel files are created using excel 4.0. I have created an excel connection manager and provided it with the path of the excel sheet.Next i have added an excel source from the toolbox to the dataflow. I have set the connection manger, data access mode, and the name of the excel sheet (the wizard detects the sheet correctly) in the dialog window i get when i double click the excel source. Every thing goes fine till here. Now when i select the 'columns' in this dialog window or the preview button, i get this error

TITLE: Microsoft Visual Studio

Error at Data Flow Task [Excel Source [1]]: An OLE DB error has occurred. Error code: 0x80004005.
Error at Data Flow Task [Excel Source [1]]: Opening a rowset for "test4$" failed. Check that the object exists in the database.

ADDITIONAL INFORMATION:
Exception from HRESULT: 0xC02020E8 (Microsoft.SqlServer.DTSPipelineWrap)

Any ideas about why is this happening?
UmerDid you specify the Excel 4.0 as the version in the connection manager?|||yes i have specified the version 4.0 in the connection manager

Monday, March 26, 2012

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:

> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>|||When you say that you are trying to connect to a 32 or 64 bit machine, you
don't say if you are trying to do this from this new machine or from the
first 32 bit machine; so it's hard to say if you have problem connecting to
a remote machine or if you have problem connecting to a 64 bit machine or
from a 64 bit environment. You don't even tell us if you are able to
connect with SSMS or SSMSE.
If you have problem connecting to a remote machine, make the usual check
about the firewall, the permissions on the remote machine and on the remote
SQL-Server and try using TCP instead of named pipes or the multi-protocol.
If you have problem connecting to a 64 bit machine, try using TCP instead of
named pipes or the multi-protocol.
If you have problem connecting from a 64 machine, first check if you are
running in the simulated 32 bit environment (WOW64) or in the 64 bit
environment. Many older protocols won't be able to run in the 64 bit
environment or to make calls to the 64 bit environment from WOW64. If it
cannot run from the 64 bit environment, use another protocol, if it cannot
make calls to the 64 bit environment, try using TCP instead of named pipes
or use another protocol such as the SQL Native Provider. More info and
troubleshooting:
http://www.connectionstrings.com/?carrier=sqlserver2005
http://blogs.msdn.com/sqlexpress/ar.../05/415084.aspx
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (connection strings for
sql providers)
For SSMSE:
http://www.microsoft.com/downloads/...B8-5A0F62BF7796
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
<kk.simhadri@.gmail.com> wrote in message
news:1175009603.109380.73620@.y80g2000hsf.googlegroups.com...
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection. CreateInstance(__uuidof(ADODB::Connectio
n));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance(__uuidof(ADODB::Conne ction));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.
Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:

> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Conne ction));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

problem in connecting to SQL2005 on 64 bit machine

Hi,
I am using the following code to connect to SQL2005 database
ADODB::_ConnectionPtr m_pConnection;
m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
m_pConnection->open(Server=aron1;Driver={SQL
Server};database=master;"","",NULL)
if(m_pConnection->GetState() != ADODB::adStateOpen)
done
else
error.
it works fine with SQL2005(32 bit) installed on 32 bit windows XP
machine.
but when I try to connect to SQL2005(either 32bit or 64 bit) installed
on a 64 bit XP machine.it gives me an error
Provider is not specified and there is no designated default provider.
how can I solve this issue ?
Thanks in advance.Can you connect to the said SQL2005 instance with a tool such as Query
Analyzer or osql?
Linchi
"kk.simhadri@.gmail.com" wrote:
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>|||When you say that you are trying to connect to a 32 or 64 bit machine, you
don't say if you are trying to do this from this new machine or from the
first 32 bit machine; so it's hard to say if you have problem connecting to
a remote machine or if you have problem connecting to a 64 bit machine or
from a 64 bit environment. You don't even tell us if you are able to
connect with SSMS or SSMSE.
If you have problem connecting to a remote machine, make the usual check
about the firewall, the permissions on the remote machine and on the remote
SQL-Server and try using TCP instead of named pipes or the multi-protocol.
If you have problem connecting to a 64 bit machine, try using TCP instead of
named pipes or the multi-protocol.
If you have problem connecting from a 64 machine, first check if you are
running in the simulated 32 bit environment (WOW64) or in the 64 bit
environment. Many older protocols won't be able to run in the 64 bit
environment or to make calls to the 64 bit environment from WOW64. If it
cannot run from the 64 bit environment, use another protocol, if it cannot
make calls to the 64 bit environment, try using TCP instead of named pipes
or use another protocol such as the SQL Native Provider. More info and
troubleshooting:
http://www.connectionstrings.com/?carrier=sqlserver2005
http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
http://msdn2.microsoft.com/en-us/library/ms345318.aspx
http://www.datamasker.com/SSE2005_NetworkCfg.htm (connection strings for
sql providers)
For SSMSE:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=C243A5AE-4BD1-4E3D-94B8-5A0F62BF7796
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
<kk.simhadri@.gmail.com> wrote in message
news:1175009603.109380.73620@.y80g2000hsf.googlegroups.com...
> Hi,
> I am using the following code to connect to SQL2005 database
> ADODB::_ConnectionPtr m_pConnection;
> m_pConnection.CreateInstance(__uuidof(ADODB::Connection));
> m_pConnection->open(Server=aron1;Driver={SQL
> Server};database=master;"","",NULL)
> if(m_pConnection->GetState() != ADODB::adStateOpen)
> done
> else
> error.
> it works fine with SQL2005(32 bit) installed on 32 bit windows XP
> machine.
> but when I try to connect to SQL2005(either 32bit or 64 bit) installed
> on a 64 bit XP machine.it gives me an error
> Provider is not specified and there is no designated default provider.
> how can I solve this issue ?
> Thanks in advance.
>

Tuesday, March 20, 2012

problem for Security in Sql 2005 Express.

hi
i am using vc# 2005 and sql 2005 express.
my problem is does exist any way to set password on sql2005 database ?
(because i don't want to end users access to sql server's tables and datas and ...)
how to solve my problem ?
thanks

Hi Hamed

You can download Microsoft SQL Server Management Studio Express and you can create users there for your database.

Regards,

Pradeep

|||

Hi,

You don′t set password on databases. You create logins on the server level (server principals) which relate to either a Windows Account (Windows Authentication) or a SQL Server account (SQL Server authewntication). These principals can be either in a overall server role and / or be granted access to individual databases with database principals. these database principals can be granted individual right on the objects within the database (securables) or can be assigned to database roles.

So, first create a server login for an indivudal user or a Windows groups, then grant the appropiates right either individually or through the role membership within the database.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de