Friday, February 24, 2012

A question about connecting with SQL server - Help

Hi -Please read below - to help me - thanks

May i explain what i want to do, im a webmaster of my friend's server, i would like to know how i can acess the SQL Server of my friend to put on the homepage ( im doing the home page), so its a remote access, i think, then i want to access a Database the server, i try many times but not happens on the page, it shows blank, im using two programs the ''Web matrix'' and ''Dreamweaver'', please one month ago im trying do to this but it never fuction.

Database name: MuOnline
Table: MEMB_STATS
Column: memb stats

Please i must know it... Thank you !www.connectionstrings.com has a section on SQL Server on the front page, expand it and it will show connection strings and the code to use them.|||i think this site too complex|||i think the site complex, so can u read my case, and say what type of conecction I must use:

please over!

- type of connections:

ODBC
OLE DB, OleDbConnection
sqlconnection
data shape|||SqlConnection. You need to know whether you will use integrated security, or a username and password. No one can tell you which you should use, the type you use is up to how your sql server is set up.|||thanks, but i have 5 questions to do, but if possible can i send a emal to you? i need to know some questions that i dont know....answer me if can i

Thanks otherwise!|||when i finish the connection, how can i do to acess a especifc table or column?
In my case to show who is online in the sql server.|||my second question is; Are the ID and Pass, needed? Or if i want?|||No, I don't think I will help you with your homework. If you have questions, post them here and we will see what we can do.|||This depends upon how your database was set up by whoever installed it. Do you have a username and password? If so, use that.|||http://www.dotnetjunkies.com/quickstart/aspplus/doc/webdataaccess.aspx#adoplus|||douglas thanks!

when i finish the connectinstring, and the conection to the tables...nothing more to do?
i have to do this page on a .ASP page??

Thanks otherwise.|||This is an ASP.NET forum, and I have been pointing you to resources got use with ASP.NET, not classic ASP.

If this IS ASP.NET, after this code:

Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

you can check:

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString() to get a string representation of the field named.|||thanks so much!

The sql server dont have username and pass.
---------------------------
Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString()
----------------------------
can i use this to acess my sql server??|||''pubs''= the name of the database
''server'' = DSN
'' Authors'' = table
second ''Authors''= name of column
''Name of Your field''= name of column]

IS it correct?
if it isnt correct over for me please.

-----------------
Dim myConnection As New SqlConnection( _
"server=(local)\NetSDK;database=pubs;Integrated Security=SSPI")
Dim myCommand As New SqlDataAdapter("select * from Authors", myConnection)

Dim ds As New DataSet()
myCommand.Fill(ds, "Authors")

ds.Tables[0].Rows[0]["Name Of Your Field"].ToString()

No comments:

Post a Comment