Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Friday, March 23, 2012

How to Connect SQL server Using ASP.net

Dear ASP.NET user...

I'm a new user in ASP.NET...
i have a problem facing now...
I'm using SQL server as my database...
how do i CONNECT my web application using ASP.NET to SQL server??

What should i do?
any coding do i need to insert to my web HTML?

what i heard from my friend...she said web config can connect the web application to SQL server...?...it that work?

pls help me guys and gals...

From jhwong2610
URGENTVery often the web.config is used to store the connection string - that alone does not connect you to a database - using the connection string you have to open a sqlConnection and then proceed from there.

My best recommendation would be to pick up one of the ASP.NET books and look at one of the examples that uses data binding.|||Hi:
Like This


Dim Conn As New SqlConnection("ConnectionStringHere")
Dim Conn As New SqlCommand("Select * From Table", Conn)
Dim DRs As SqlDataReader
Conn.Open()
DRs = Comm.ExecuteReader()
If DRs.Read() Then
Response.Write(DRs("Column"))
End If
DRs.Close()
Conn.Close()
|||Add this to the web.config file:

<configuration>
<appSettings>
<add key="SQLConnStr" value="<your connection string" />
</appSettings
...

You can use the connectionstring in the code like this:

Dim str as connStr = System.Configuration.ConfigurationSettings.AppSettings("SQLConnStr")

how to connect sql server to oracle

ha
i am facing the problem that
i am unable to connect sql server to oracle
i have sqlserver in my system and oracle server is in remote
i want to access that database with using DTS
so that ,mmy memory will bw save
could any one please help for this
please yaar i am waitinf fro urs reply
Configure it as a linked server. To create linked server , open
EM->Security->Linked Server.
vinu
"dev" <dev@.discussions.microsoft.com> wrote in message
news:50B38365-9030-4810-9753-D58C5FAD591E@.microsoft.com...
> ha
> i am facing the problem that
> i am unable to connect sql server to oracle
> i have sqlserver in my system and oracle server is in remote
> i want to access that database with using DTS
> so that ,mmy memory will bw save
> could any one please help for this
>
> please yaar i am waitinf fro urs reply
>
|||hi
vinu
i did that
EM->Security->Linked Server.
but when ever i am trying to acess the table it gives a message that
ERROR 7399:OLEDB provider 'MSDAORA' reported an error
could u please clarify about this
"vinu" wrote:

> Configure it as a linked server. To create linked server , open
> EM->Security->Linked Server.
> vinu
>
> "dev" <dev@.discussions.microsoft.com> wrote in message
> news:50B38365-9030-4810-9753-D58C5FAD591E@.microsoft.com...
>
>
|||This might be helpful
http://support.microsoft.com/kb/280106
vinu
"dev" <dev@.discussions.microsoft.com> wrote in message
news:4A97A14E-04C8-4460-9688-2A4FAD4697FB@.microsoft.com...[vbcol=seagreen]
> hi
> vinu
> i did that
> EM->Security->Linked Server.
> but when ever i am trying to acess the table it gives a message that
> ERROR 7399:OLEDB provider 'MSDAORA' reported an error
> could u please clarify about this
>
> "vinu" wrote:
|||hi vinu
let me try this it will take some time it has some work with registry
fro that it s late
thanks fro giviing this suggestion
if nothing i will get back to you
thanks yaar
"vt" wrote:

> This might be helpful
> http://support.microsoft.com/kb/280106
>
> vinu
>
> "dev" <dev@.discussions.microsoft.com> wrote in message
> news:4A97A14E-04C8-4460-9688-2A4FAD4697FB@.microsoft.com...
>
>
|||Can you connect using the native Oracle tools? net Configuration Assistant
provides a means of testing the connection, and SQL+ will also do the same.
This is the first step and the most often missed step - to check that you
have a valid TNS entry and the firewall is correctly configured.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
sql

Wednesday, March 7, 2012

How to compact & repair a database in SQL Server?

Hi,
I am facing a problem. I have a table with indexes (integers). These
occur out of sequence i.e. not in serial order. Due to this the performance
has decreased. I have tried the following commands but of no help :
1) dbcc checkdb
2) dbcc dbreindex
3) dbcc indexdefrag
Is there any other way to resolve this problem?
Regards,
HarshadHow did you determine that fragmented indexes are your problem? DBCC SHOWCON
TIG? Can you post the
result from DBCC SHOWCONTIG?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Harshad Phadnis" <HarshadPhadnis@.discussions.microsoft.com> wrote in messag
e
news:4845A140-D9BC-4B76-965B-1C29E3121893@.microsoft.com...
> Hi,
> I am facing a problem. I have a table with indexes (integers). These
> occur out of sequence i.e. not in serial order. Due to this the performanc
e
> has decreased. I have tried the following commands but of no help :
> 1) dbcc checkdb
> 2) dbcc dbreindex
> 3) dbcc indexdefrag
> Is there any other way to resolve this problem?
> Regards,
> Harshad|||Are you refering to gaps in the values of an identity column? Those are
completely irrelevant.
Use "dbcc showcontig" to analyze actual data fragmentation.
ML|||What do you mean by "not in serial order"? A table is an unordered set of
data. It has no serial order. Unless you can explain differently I suspect
you just need to use an ORDER BY statement in your queries.
David Portas
SQL Server MVP
--
"Harshad Phadnis" wrote:

> Hi,
> I am facing a problem. I have a table with indexes (integers). Thes
e
> occur out of sequence i.e. not in serial order. Due to this the performanc
e
> has decreased. I have tried the following commands but of no help :
> 1) dbcc checkdb
> 2) dbcc dbreindex
> 3) dbcc indexdefrag
> Is there any other way to resolve this problem?
> Regards,
> Harshad