Showing posts with label bit. Show all posts
Showing posts with label bit. Show all posts

Friday, March 30, 2012

Problem in insert a datetime into SqlServer 2005

I user Visual Studio 2005 64 bit ,windowxp 64 bit ,sqlserver 2005

The Sql statement : "insert into sickleave (StaffID,sickLeaveReason,DateStart,DateEnd,RegistrationDate) values (20001,'test',28/3/2006,4/5/2006,4/5/2006 ) "

and the result in Datebase (All the time become 1/1/1900 0:00:00 )

Although i change the datetype from datetime to smalldatetime the result is same

and i try input the date 28/3/2006 0:00:00 into server but

it show the error:Incorrect syntax near '0'.

What wrong ? help me please,Thank.

They have to be passed as strings:
insert into sickleave (StaffID,sickLeaveReason,DateStart,DateEnd,RegistrationDate) values (20001,'test','3/28/2006','5/4/2006','5/4/2006' ) "
or as ISO values which is preferable
insert into sickleave (StaffID,sickLeaveReason,DateStart,DateEnd,RegistrationDate) values (20001,'test',20060328,20060405,20060405 ) "
HTH, jens Suessmeyer.

|||

Your date is in the future (28th of March this year). That is not allowed:

Server: Msg 242, Level 16, State 3, Line 4
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
Server: Msg 296, Level 16, State 3, Line 5
The conversion of char data type to smalldatetime data type resulted in an out-of-range smalldatetime value.

HTH

|||

I prefer to use dates in the following format 'yyyy-mm-dd'.

Have you tried that already (as mentioned above)?

WesleyB

Visit my SQL Server weblog @. http://dis4ea.blogspot.com

|||

@.Original Poster: Could you please track the status of the post ? Thanks.

-Jens

sql

Wednesday, March 28, 2012

Problem in deployment on SSAS 64 bit with Oracle 10g 32 bit client (as datasource)

Hi,

I installed SQL Server 2005 64 bit and have Oracle 10g 32 bit client,
I am creating a cube based on Oracle datasource by connecting Oracle 10g 32bit client.

when I build and process cube it Done successfully but when I deploye it to server then it gives following error.

Error 1 Errors in the high-level relational engine. The following exception
occurred while the managed IDbConnection interface was being used: Attempt
to load Oracle client libraries threw BadImageFormatException. This problem
will occur when running in 64 bit mode with the 32 bit Oracle client
components installed.. 0 0

Error 2 Errors in the high-level relational engine. A connection could not
be made to the data source with the DataSourceID of 'Oracle DW Call Detail',
Name of 'Oracle DW Call Detail'. 0 0

any suggestion regarding this ?

Hi Kawish,

Did you solve this prolem? I am having the same problemss as you describe here.

look forward to hearing from you..

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.
>