Hi everybody,
I developed a windows application that connects to Sql server 2000, using
windows authentication and it works, able to retrive and other data process.
But when I used it on Sql Server 2005 Express, it was unable to retrive data
.
What is wrong with it? How can I fixed this?
Connecting String at 2000:
"integrated security=SSPI;data source=localhost;persist security
info=False;initial
catalog=Genesis;"
Connection String at 2005:
"integrated security=SSPI;data source=RITS-DENNIS\SQLEXPRESS;persist securit
y
info=False;initial catalog=Genesis;"
"user id=guest;password=guest123;data source=RITS-DENNIS\SQLEXPRESS;persist
security info=False;initial catalog=Genesis;"
Thanks in Advanced.
den2005
--
MCP Year 2005, PhilippinesWhat exactly does "unable to retrieve data" mean? Is it a problem
connecting to SQL Server? Do you get errors when you run queries? Do you
not get errors but no data? It could be a million things you have to help
us out here.
Andrew J. Kelly SQL MVP
"den 2005" <den2005@.discussions.microsoft.com> wrote in message
news:4CA57567-F7CD-42C0-B588-4609ADFB5730@.microsoft.com...
> Hi everybody,
> I developed a windows application that connects to Sql server 2000,
> using
> windows authentication and it works, able to retrive and other data
> process.
> But when I used it on Sql Server 2005 Express, it was unable to retrive
> data.
> What is wrong with it? How can I fixed this?
> Connecting String at 2000:
> "integrated security=SSPI;data source=localhost;persist security
> info=False;initial
> catalog=Genesis;"
> Connection String at 2005:
> "integrated security=SSPI;data source=RITS-DENNIS\SQLEXPRESS;persist
> security
> info=False;initial catalog=Genesis;"
> "user id=guest;password=guest123;data
> source=RITS-DENNIS\SQLEXPRESS;persist
> security info=False;initial catalog=Genesis;"
>
> Thanks in Advanced.
> den2005
> --
> MCP Year 2005, Philippines|||Thanks for replying, Andrew.
Able to open SqlConnection but no data is returned or retrived, and no error
message either.
Dennis
--
MCP Year 2005, Philippines
"Andrew J. Kelly" wrote:
> What exactly does "unable to retrieve data" mean? Is it a problem
> connecting to SQL Server? Do you get errors when you run queries? Do you
> not get errors but no data? It could be a million things you have to help
> us out here.
> --
> Andrew J. Kelly SQL MVP
>
> "den 2005" <den2005@.discussions.microsoft.com> wrote in message
> news:4CA57567-F7CD-42C0-B588-4609ADFB5730@.microsoft.com...
>
>|||Again we need as much info as you can give us. Your initial post shows only
a connection string. There is no example of what you are doing after that.
Just opening a connection does not return data, you need to issue a
statement. Can you post the exact code you are using to issue the command
and how you are determining it does not return anything?
Andrew J. Kelly SQL MVP
"den 2005" <den2005@.discussions.microsoft.com> wrote in message
news:4867BFEF-7E1E-4C73-9033-9001EAAA90F7@.microsoft.com...[vbcol=seagreen]
> Thanks for replying, Andrew.
> Able to open SqlConnection but no data is returned or retrived, and no
> error
> message either.
> Dennis
> --
> MCP Year 2005, Philippines
>
> "Andrew J. Kelly" wrote:
>|||Hi Andrew,
Thanks for reply. Well, I have found what is wrong, and able to retrive
data. There ia one strange incident involving storing data, I inserted a lot
of records in SQl server 2005 using Windows authentication to log on the sql
server, the other day, I look into the data and it's gone, seems the data ha
s
been erased or was not all inserted permanently.
Yesterday, I used the sa account to do the same, today, I check the data
inserted yesterday was still here. Why does that happens? Using windows
authentication to insert data is not ok. I am doing this in sql 2000, and it
is working.
Solved Problem Codes: (This is not exact code, Basically this is what trying
to do)
Dim sqlConn As New SqlConnection(constr)
Dim sqlText = "Select * From Topics"
Dim sqlAdapter As new SqlDataAdapter(sqlText, sqlConn)
Dim ds as new DataSet
sqlAdapter.Fill(ds,"Topics')
Dim dtObj as Datatable
dtObj = ds.Tables("Topics")
return dtObj
dennis
--
MCP Year 2005, Philippines
"Andrew J. Kelly" wrote:
> Again we need as much info as you can give us. Your initial post shows onl
y
> a connection string. There is no example of what you are doing after that.
> Just opening a connection does not return data, you need to issue a
> statement. Can you post the exact code you are using to issue the command
> and how you are determining it does not return anything?
> --
> Andrew J. Kelly SQL MVP
>
> "den 2005" <den2005@.discussions.microsoft.com> wrote in message
> news:4867BFEF-7E1E-4C73-9033-9001EAAA90F7@.microsoft.com...
>
>|||The reason you seemed to have lost the data was probably due to the
connection setting it in IMPLICIT TRANSACTION mode. This means when the
first command is issued a BEGIN TRAN automatically gets issued behind the
scenes. That means all of your inserts were wrapped in a transaction. If
you didn't issue a COMMIT when done they would have been rolled back when
you ended the connection.
Andrew J. Kelly SQL MVP
"den 2005" <den2005@.discussions.microsoft.com> wrote in message
news:B01C3A0C-6F8E-40DF-BCF6-2E137D78EE13@.microsoft.com...[vbcol=seagreen]
> Hi Andrew,
> Thanks for reply. Well, I have found what is wrong, and able to retrive
> data. There ia one strange incident involving storing data, I inserted a
> lot
> of records in SQl server 2005 using Windows authentication to log on the
> sql
> server, the other day, I look into the data and it's gone, seems the data
> has
> been erased or was not all inserted permanently.
> Yesterday, I used the sa account to do the same, today, I check the
> data
> inserted yesterday was still here. Why does that happens? Using windows
> authentication to insert data is not ok. I am doing this in sql 2000, and
> it
> is working.
> Solved Problem Codes: (This is not exact code, Basically this is what
> trying
> to do)
> Dim sqlConn As New SqlConnection(constr)
> Dim sqlText = "Select * From Topics"
> Dim sqlAdapter As new SqlDataAdapter(sqlText, sqlConn)
> Dim ds as new DataSet
> sqlAdapter.Fill(ds,"Topics')
> Dim dtObj as Datatable
> dtObj = ds.Tables("Topics")
> return dtObj
>
> dennis
> --
> MCP Year 2005, Philippines
>
> "Andrew J. Kelly" wrote:
>|||Andrew,
Transaction? I did not use them, I used the query window and put insert
statements and execute by pressing F5. Is there a automatic transaction mode
at the back of this operation? I used sa account, why i did not lose the dat
a
same as before, the change I did is only the account I used to login.
Thanks for reply.
dennis
--
MCP Year 2005, Philippines
"Andrew J. Kelly" wrote:
> The reason you seemed to have lost the data was probably due to the
> connection setting it in IMPLICIT TRANSACTION mode. This means when the
> first command is issued a BEGIN TRAN automatically gets issued behind the
> scenes. That means all of your inserts were wrapped in a transaction. If
> you didn't issue a COMMIT when done they would have been rolled back when
> you ended the connection.
> --
> Andrew J. Kelly SQL MVP
>
> "den 2005" <den2005@.discussions.microsoft.com> wrote in message
> news:B01C3A0C-6F8E-40DF-BCF6-2E137D78EE13@.microsoft.com...
>
>|||By default the Query Editor does not use Implicit Transactions but you can
change the options to be in that mode. It is hard to say what actually
happened but most of the time people ask about something like this it is the
result of an inadvertent BEGIN TRAN and no COMMIT.
Andrew J. Kelly SQL MVP
"den 2005" <den2005@.discussions.microsoft.com> wrote in message
news:7E08B896-BBD9-4D0C-B5AD-8C3A21D6EB53@.microsoft.com...[vbcol=seagreen]
> Andrew,
> Transaction? I did not use them, I used the query window and put insert
> statements and execute by pressing F5. Is there a automatic transaction
> mode
> at the back of this operation? I used sa account, why i did not lose the
> data
> same as before, the change I did is only the account I used to login.
> Thanks for reply.
> dennis
> --
> MCP Year 2005, Philippines
>
> "Andrew J. Kelly" wrote:
>
Friday, March 23, 2012
No data in Sql 2005 tehre is data in sql 2000
Labels:
application,
authentication,
connects,
database,
developed,
everybody,
microsoft,
mysql,
oracle,
retrive,
server,
sql,
tehre,
usingwindows,
windows
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment