Showing posts with label connected. Show all posts
Showing posts with label connected. Show all posts

Wednesday, March 28, 2012

HOW TO CONNECTED MS SQL 2005?

I had just install MS SQL 2005 at my server computer ( OS windows 2000
server sp4). I have LAN in office with workgroup, and I have a problem
that I can't connect to MS SQL 2005 from client mechine. Previously, I
used MS SQL 2000 server.
Please anybody can help me to resolve this problem?
Regard's
Rudi H
Try this:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"RUDI HARSONO" <binapusat@.nusa.net.id> wrote in message
news:%23k1wt7LJHHA.780@.TK2MSFTNGP03.phx.gbl...
>I had just install MS SQL 2005 at my server computer ( OS windows 2000
>server sp4). I have LAN in office with workgroup, and I have a problem that
>I can't connect to MS SQL 2005 from client mechine. Previously, I used MS
>SQL 2000 server.
> Please anybody can help me to resolve this problem?
> Regard's
> Rudi H
|||Arnie Rowland wrote:
> Try this:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
>
thanks for your help...

HOW TO CONNECTED MS SQL 2005?

I had just install MS SQL 2005 at my server computer ( OS windows 2000
server sp4). I have LAN in office with workgroup, and I have a problem
that I can't connect to MS SQL 2005 from client mechine. Previously, I
used MS SQL 2000 server.
Please anybody can help me to resolve this problem?
Regard's
Rudi HTry this:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/defaul...kb;EN-US;914277
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"RUDI HARSONO" <binapusat@.nusa.net.id> wrote in message
news:%23k1wt7LJHHA.780@.TK2MSFTNGP03.phx.gbl...
>I had just install MS SQL 2005 at my server computer ( OS windows 2000
>server sp4). I have LAN in office with workgroup, and I have a problem that
>I can't connect to MS SQL 2005 from client mechine. Previously, I used MS
>SQL 2000 server.
> Please anybody can help me to resolve this problem?
> Regard's
> Rudi H|||Arnie Rowland wrote:
> Try this:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/defaul...kb;EN-US;914277
>
thanks for your help...

Friday, March 23, 2012

how to connect from visual studio to a ms sql 2005 database on a server

Hello,

I have visual studio 2005 installed on my PC. I want to create a new website and I want the site to be connected to a MS SQL 2005 database that resides on my hosting account. I am thinking this can be done but I have watched videos, spent time looking for a site to help and I have hit a brick wall.

I have no idea how to do this.

Can anyone please help me with some instructions or a webpage that shows you how to do this.

Thank You

Joe

Hello,

I have found the solution and would like to share it with anyone that needs this info.

I have found you can connect to a ms sql 2005 database that resides on your hosting account either by
using the Visual Web Developer Express Edition which is free or Microsoft Visual Studio.

The first thing you need is asp 2.0 hosting account and a ms sql 2005 database activated on your hosting account.

The below will work for both versions of software mentioned above.

1. OPen your desired software program and Create a New Website

2. In the database explorer right mouse click on Data Connections and add a new connection.

Datasource = Microsoft SQL Server (SQL Client)

Server Name = This should of been supplied by your hosting provider eg sql26565.aspprovider.net

Select - Use SQL Authorisation

User Name = your username for your database (this should be provider by your provider)

Password = your password for the database (this should be provider by your provider)

Select the database from within the connect to database tab

Click ok and the database should be connected and appears under the Data Connections Folder.

If you need to know how to add grids etc there are lots of very handy videos which with what you learn will work on both versions of teh software programs mentioned here.

I Hope this helps anyone that had faced the same issue that I have. So many learning videos out there but an important step that has been missed due to the focus on the express editions.

Thanks

Joe

|||If you need to know how to add grids etc pls visit which applies to both versions of the
software mentioned. --> http://msdn.microsoft.com/vstudio/express/vwd/learning/default.aspx

Wednesday, March 21, 2012

How to connect ADODB with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Mic

Hi

We are checking VB 9 (Orcas).

we connected to database created under with sql server 7. with this code

Public cn As New ADODB.Connection

Public Sub OpenDB()

cn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial catalog=Reservation;Data Source=.")

End Sub

this code worked well.

we know sql7 is not compatiable with vista. please tell us how to connect it wiith sql2005 . we downloaded orcas express edition beta. we created a database also. please let u know how to connect with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5).

Rgds

Pramod

Hi Pramod,

VB 08 (orcas) changed a lot. You can now make a connection without having to type one line of code (using Typed dataset)

But this still depend on your need !

|||

Hi

thanks verymuch for your valuable support . We tried dataset also. it dint worked.

please check the code

'================Sample Code==========

Dim conn As New SqlConnection("Server=.\SQLEXPRESS;Database=test;Trusted_Connection=false;")

Dim ds As New DataSet

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

conn.Open()

Dim adp As New SqlDataAdapter("Select * From personal", conn)

adp.Fill(ds)

DataGridView1.DataSource = ds.Tables(0)

conn.Close()

'================Sample Code==========

Cannot open database "test" requested by the login. The login failed. Login failed for user 'Pramod\Administrator'.

plz tell how to build a connection string. (We tried datasource Configuration wizard)

Plz help

rgds

Pramod

|||

try this code

Code Snippet

'Store a connection string
Dim connectionstring As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Omar Abid\Mes Documents\data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
'Create new SQL Connection
Dim sqlconnection As New SqlConnection(connectionstring)
Using sqlconnection
Dim sqlcommand As SqlCommand = sqlconnection.CreateCommand
Using sqlcommand
sqlcommand.CommandType = CommandType.Text
sqlcommand.CommandText = "select * from table1"
Dim adapter As New SqlDataAdapter(sqlcommand)
Using adapter
Dim datatable As New DataTable("user")
Using datatable
adapter.Fill(datatable)
DataGridView.DataSource = datatable

End Using
End Using
End Using
End Using

|||

Thanks dear

it worked well,

our practice is to use pass queries to database like

cn.execute (Insert into ((.......))

how the dame works with data adapter.

Plz help us with a sample code

rgds

Pramod

|||

Hi

please advice us regarding the code. is it the usual option available.

-

Dim ds As New DataSet

Dim adp As New SqlDataAdapter("Select max(" & Field & ") + 1 as MAxid from " & tableName & IIf(Condition <> vbNullString, " where " & Condition, ""), cn)

adp.Fill(ds)

If IsDBNull(ds.Tables(0).Columns("MaxID")) Then

GetMaxID = 1

Else

GetMaxID = ds.Tables(0).Columns("MaxID")

End If

--

|||

sorry i don't know a lot on SQL. But I think that Adapter is the new technology.

For VB 9 there's also LINQ you may be interested on it

|||Hi

how can i connect with a client system. (in case of server we are using a path from the system). we want to connect it from networks also)

How to connect ADODB with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Mic

Hi

We are checking VB 9 (Orcas).

we connected to database created under with sql server 7. with this code

Public cn As New ADODB.Connection

Public Sub OpenDB()

cn.Open("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial catalog=Reservation;Data Source=.")

End Sub

this code worked well.

we know sql7 is not compatiable with vista. please tell us how to connect it wiith sql2005 . we downloaded orcas express edition beta. we created a database also. please let u know how to connect with Microsoft SQL Server Compact 3.5 (.NET Framework Data Provider for Microsoft SQL Server Compact 3.5).

Rgds

Pramod

Hi Pramod,

VB 08 (orcas) changed a lot. You can now make a connection without having to type one line of code (using Typed dataset)

But this still depend on your need !

|||

Hi

thanks verymuch for your valuable support . We tried dataset also. it dint worked.

please check the code

'================Sample Code==========

Dim conn As New SqlConnection("Server=.\SQLEXPRESS;Database=test;Trusted_Connection=false;")

Dim ds As New DataSet

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

conn.Open()

Dim adp As New SqlDataAdapter("Select * From personal", conn)

adp.Fill(ds)

DataGridView1.DataSource = ds.Tables(0)

conn.Close()

'================Sample Code==========

Cannot open database "test" requested by the login. The login failed. Login failed for user 'Pramod\Administrator'.

plz tell how to build a connection string. (We tried datasource Configuration wizard)

Plz help

rgds

Pramod

|||

try this code

Code Snippet

'Store a connection string
Dim connectionstring As String = "Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Documents and Settings\Omar Abid\Mes Documents\data.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
'Create new SQL Connection
Dim sqlconnection As New SqlConnection(connectionstring)
Using sqlconnection
Dim sqlcommand As SqlCommand = sqlconnection.CreateCommand
Using sqlcommand
sqlcommand.CommandType = CommandType.Text
sqlcommand.CommandText = "select * from table1"
Dim adapter As New SqlDataAdapter(sqlcommand)
Using adapter
Dim datatable As New DataTable("user")
Using datatable
adapter.Fill(datatable)
DataGridView.DataSource = datatable

End Using
End Using
End Using
End Using

|||

Thanks dear

it worked well,

our practice is to use pass queries to database like

cn.execute (Insert into ((.......))

how the dame works with data adapter.

Plz help us with a sample code

rgds

Pramod

|||

Hi

please advice us regarding the code. is it the usual option available.

-

Dim ds As New DataSet

Dim adp As New SqlDataAdapter("Select max(" & Field & ") + 1 as MAxid from " & tableName & IIf(Condition <> vbNullString, " where " & Condition, ""), cn)

adp.Fill(ds)

If IsDBNull(ds.Tables(0).Columns("MaxID")) Then

GetMaxID = 1

Else

GetMaxID = ds.Tables(0).Columns("MaxID")

End If

--

|||

sorry i don't know a lot on SQL. But I think that Adapter is the new technology.

For VB 9 there's also LINQ you may be interested on it

|||Hi

how can i connect with a client system. (in case of server we are using a path from the system). we want to connect it from networks also)