Showing posts with label hii. Show all posts
Showing posts with label hii. Show all posts

Tuesday, March 27, 2012

Accessing Index Server from SQL Server on different system

Hi
I have SQL Server and Index Server running on 2 different system.
How can I call Index server from SQL Server (store procedure) in such
case.
Regards

> Hi
> I have SQL Server and Index Server running on 2 different system.
> How can I call Index server from SQL Server (store procedure) in such
> case.
> Regards
You can connect use the OLE DB Provider for Microsoft Indexing Service to
connect to the remote Index Server. More info:
http://msdn.microsoft.com/library/de...us/acdata/ac_8
_qd_12_0h0l.asp
Eric Crdenas
Support professional
This posting is provided "AS IS" with no warranties, and confers no rights.

Accessing Index Server from SQL Server on different system

Hi
I have SQL Server and Index Server running on 2 different system.
How can I call Index server from SQL Server (store procedure) in such
case.
Regards
> Hi
> I have SQL Server and Index Server running on 2 different system.
> How can I call Index server from SQL Server (store procedure) in such
> case.
> Regards
--
You can connect use the OLE DB Provider for Microsoft Indexing Service to
connect to the remote Index Server. More info:
http://msdn.microsoft.com/library/d...-us/acdata/ac_8
_qd_12_0h0l.asp
Eric Crdenas
Support professional
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, March 25, 2012

Accessing data from a programmatically created SqlDataSource

Hi

I think I've programmatically created a SqlDataSource - which is what I want to do; but I can't seem to access details from the source - row 1, column 1, for example??

IfNot Page.IsPostBackThen

'Start by determining the connection string value

Dim connStringAsNew Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)

'Create a SqlConnection instance

Using connString

'Specify the SQL query

Const sqlAsString ="SELECT eventID FROM viewEvents WHERE eventID=17"

'Create a SqlCommand instance

Dim myCommandAsNew Data.SqlClient.SqlCommand(sql, connString)

'Get back a DataSet

Dim myDataSetAsNew Data.DataSet

'Create a SqlDataAdapter instance

Dim myAdapterAsNew Data.SqlClient.SqlDataAdapter(myCommand)

myAdapter.Fill(myDataSet)

Label1.Text = myAdapter.Tables.Rows(0).Item("eventID").ToString() -??????

'Close the connection

connString.Close()

EndUsing

EndIf


Thanks for any help
Richard

No, you haven't programmatically created a SqlDataSource. You have used plain ADO.NET code to create and fill a DataSet. The DataAdapter is purely a bridge between the dataset and your data source (the database). It doesn't contain tables. The Dataset does though. It holds them in a zero-based collection:

Label1.Text = MyDataSet.Tables(0).Rows(0)("eventID").ToString()

But if all you want is one value from the database, you are better off using Command.ExecuteScalar():

Dim connString As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString)
Using connString
Const sql As String = "SELECT eventID FROM viewEvents WHERE eventID=17"
Dim myCommand As New Data.SqlClient.SqlCommand(sql, connString)
Label1.Text = mycommand.ExecuteScalar().ToString()
...etc

Thursday, March 22, 2012

accessing another database in a stored procedure

hi

i have stored procedure and i need to access another database in my stored procedure

I'm going to query a table which is located in another database

as you know it is impossible to use the USE database keyword in stored procedures

so what should I do?

thanks.

create myProc
as

select someStuff from otherDb.dbo.otherTable
.....

just qualify the table in the other db fully with the databasename.

/Kenneth

|||Not to mention permissions...the user executing the stored procedure should have permissions to the other database|||Hi

You specify a different database on the same sql server within a stored procedure using the format:
[databasename].dbo.TableName

for example

select [Users].dbo.Addresses

Tuesday, March 20, 2012

Access2SQL

Hi
I want to change the code from using Access to SQL server 2000, what do i have to change in the next sentence:
dim Conn as new OleDbConnection("Provider=" & "Microsoft.Jet.OLEDB.4.0;" & _
"Data Source =D:\f\o\forfera\private\R.mdb")

dim objCmd as OleDbCommand = new OleDbCommand ("ValidateUser", Conn)
objCmd.CommandType = CommandType.StoredProcedure

Do i have to change another things in my code, like importing any namespace?
Thank'sSkip the OleDb Namespace and exchange it with the SqlClient Namespace. As for your code:


Dim Conn as New OleDbConnection("Server=<yoursqlserver>;uid=<username>;pwd<secret>;database=<yourdatabasename>")
Dim objCmd as New SqlCommand("ValidateUser", Conn)
objCmd.CommandType = CommandType.StoredProcedure

Remember also to change your eventual OleDbType to SqlDbType when using parameters. In short, whereever you use OleDb, use Sql instead.|||I know Andre has answered this question already,
and I'd like to share a tool with all of you. :)
FYI:http://weblogs.asp.net/coltk/archive/2004/05/31/144810.aspx

Regards, Colt|||Hi
Thank's for the answer, dont i have to write the source of the data base(location)?
Thank's|||The source of your database is your SQL Server. If the SQL Server is installed on your local development machine, your server is 'localhost' or '<machinename>'. If you are connecting to a remote machine, use the IP no, or Url of the Sql Server machine.

Sunday, March 11, 2012

access to sqlserver database from web

Hi
I do not want to install SQL server client on every user machine.
I want to give users access from browser to the sqlserver 2000 database.
Is it possible?
I saw sqlserver webadministrator?
From the name it looks like a administration tool?
Thanks
Mangesh
"SQL Server Web Data Administrator"
http://www.microsoft.com/downloads/d...displaylang=en
Cristian Lefter, SQL Server MVP
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:8B328C00-790E-4FD0-82F3-022F3C6ABA40@.microsoft.com...
> Hi
> I do not want to install SQL server client on every user machine.
> I want to give users access from browser to the sqlserver 2000 database.
> Is it possible?
> I saw sqlserver webadministrator?
> From the name it looks like a administration tool?
> Thanks
> Mangesh

access to sqlserver database from web

Hi
I do not want to install SQL server client on every user machine.
I want to give users access from browser to the sqlserver 2000 database.
Is it possible?
I saw sqlserver webadministrator?
From the name it looks like a administration tool'
Thanks
Mangesh"SQL Server Web Data Administrator"
http://www.microsoft.com/downloads/...&displaylang=en
Cristian Lefter, SQL Server MVP
"Mangesh Deshpande" <MangeshDeshpande@.discussions.microsoft.com> wrote in
message news:8B328C00-790E-4FD0-82F3-022F3C6ABA40@.microsoft.com...
> Hi
> I do not want to install SQL server client on every user machine.
> I want to give users access from browser to the sqlserver 2000 database.
> Is it possible?
> I saw sqlserver webadministrator?
> From the name it looks like a administration tool'
> Thanks
> Mangesh

Thursday, March 8, 2012

Access to sql on windows for mysql application

Hi
I hope someone here can advise or at least point me to a good site to
pursue this.
Have installed a password protection system (freeware) successfully on
a unix/php/mysql server and looking forward to developing it into a
full blown database application. I is written in php and use a mysql
database to hold user id's and passwords. There is a small amount of
code on each protected page on the site that checks the session.
I now need to set it up on a windows server system which uses IIS and
sql, mysql is not an option. It appears that ODBC could be the answer
but I don't want to fight my way through the mire of finding and fixes
issues one by one only to get trapped near the end and find it was not
possible all along.
Does anyone have any experience of the and am I on the right track.
Ideally the code will work with minimal change once set up. Would that
be possible and what would I have to set up on the server?
Thanks JohnYou'll need to look at the code and see if the SQL is really
portable. If it's a system written for a mysql backend then
it may not work. The SQL languages have different
implementations on the different database platforms. Without
knowing the app or the code, I don't know that anyone up
here could give you a definitive answer.
-Sue
On Wed, 09 Aug 2006 11:32:10 +0100, John
<yjdyhugo@.d8hujsrfu> wrote:

>Hi
>I hope someone here can advise or at least point me to a good site to
>pursue this.
>Have installed a password protection system (freeware) successfully on
>a unix/php/mysql server and looking forward to developing it into a
>full blown database application. I is written in php and use a mysql
>database to hold user id's and passwords. There is a small amount of
>code on each protected page on the site that checks the session.
>I now need to set it up on a windows server system which uses IIS and
>sql, mysql is not an option. It appears that ODBC could be the answer
>but I don't want to fight my way through the mire of finding and fixes
>issues one by one only to get trapped near the end and find it was not
>possible all along.
>Does anyone have any experience of the and am I on the right track.
>Ideally the code will work with minimal change once set up. Would that
>be possible and what would I have to set up on the server?
>Thanks John

Access To SQL

Hi
I want to convert my code from access to sql, i need to know how to write the next words in SQL:
OleDbParameter
OleDbType - I got an error when i wrote SqlType.BSTR.
Thank's.You probably want to use SqlDbType.NVarChar

Tuesday, March 6, 2012

Access to MSDE database

Hi
I am just starting my first .NET project using the web matrix and an MSDE database. I am pretty much at the limit of my knowledge - all very interesting. I have some data in an Access spreadsheet (6 columns and 365 rows) which in the past I have copied and pasted into an Access database table. How do I get it into a MSDE database table? This process does not need to be automated/programmed as I will only have to do it once a year. Any ideas on the easiest way forward would be much appreciated.
Thanks in advance.
MikeUse the Upsizing Wizard in Access. Tools/Database Utilities/Ubsizig Wizard, as I recall.|||Douglas
Very many thanks for the advise - it got me going along the righttracks. In the end I used File/Export (which seemed well suitedto transfering data in a single table). I had to configure someODBC connections (which took me a while to understand and setup). Anyway, it seems to work now.
Thanks again.
Mike

Friday, February 24, 2012

Access report with SQL server BE hangs on one p/c but not others

Hi
I have a MS Access database which uses SQL server 2000 (SBS 2003) as a
back end (using ODBC).
Can anybody explain to me why one p/c should have a problem with one
report? When you click on the button which runs the report, the egg
timer comes on for about 10 minutes and then the following error is
displayed:
Connection failed
SQL State '01000'
SQL Server error 53
[microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
Connection failed
SQL State '08001
SQL Error 17
[microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not
exist
or access denied
All other reports in the Access application run fine on this p/c. The
report itself runs fine on all other p/cs that I have tried it on. The
same error occurs whichever user is logged onto the p/c.
Can anybody make any suggestions as to what might be going on?
Thanks
ColinBooby
At first glance it seems that this specific report is connected to SQL
Server with 'wrong' login or to 'wrong' database. Also it could permission
issues
Can you compare everything with 'working' reports?
"Bobby" <bobby2@.blueyonder.co.uk> wrote in message
news:1180954455.134604.78650@.w5g2000hsg.googlegroups.com...
> Hi
> I have a MS Access database which uses SQL server 2000 (SBS 2003) as a
> back end (using ODBC).
> Can anybody explain to me why one p/c should have a problem with one
> report? When you click on the button which runs the report, the egg
> timer comes on for about 10 minutes and then the following error is
> displayed:
> Connection failed
> SQL State '01000'
> SQL Server error 53
> [microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
> Connection failed
> SQL State '08001
> SQL Error 17
> [microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does n
ot exist
> or access denied
> All other reports in the Access application run fine on this p/c. The
> report itself runs fine on all other p/cs that I have tried it on. The
> same error occurs whichever user is logged onto the p/c.
> Can anybody make any suggestions as to what might be going on?
> Thanks
> Colin
>

Access report with SQL server BE hangs on one p/c but not others

Hi
I have a MS Access database which uses SQL server 2000 (SBS 2003) as a
back end (using ODBC).
Can anybody explain to me why one p/c should have a problem with one
report? When you click on the button which runs the report, the egg
timer comes on for about 10 minutes and then the following error is
displayed:
Connection failed
SQL State '01000'
SQL Server error 53
[microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
Connection failed
SQL State '08001
SQL Error 17
[microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist
or access denied
All other reports in the Access application run fine on this p/c. The
report itself runs fine on all other p/cs that I have tried it on. The
same error occurs whichever user is logged onto the p/c.
Can anybody make any suggestions as to what might be going on?
Thanks
Colin
Booby
At first glance it seems that this specific report is connected to SQL
Server with 'wrong' login or to 'wrong' database. Also it could permission
issues
Can you compare everything with 'working' reports?
"Bobby" <bobby2@.blueyonder.co.uk> wrote in message
news:1180954455.134604.78650@.w5g2000hsg.googlegrou ps.com...
> Hi
> I have a MS Access database which uses SQL server 2000 (SBS 2003) as a
> back end (using ODBC).
> Can anybody explain to me why one p/c should have a problem with one
> report? When you click on the button which runs the report, the egg
> timer comes on for about 10 minutes and then the following error is
> displayed:
> Connection failed
> SQL State '01000'
> SQL Server error 53
> [microsoft][ODBC SQL Server Driver][DBNETLIB]Connection Open
> Connection failed
> SQL State '08001
> SQL Error 17
> [microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist
> or access denied
> All other reports in the Access application run fine on this p/c. The
> report itself runs fine on all other p/cs that I have tried it on. The
> same error occurs whichever user is logged onto the p/c.
> Can anybody make any suggestions as to what might be going on?
> Thanks
> Colin
>

Sunday, February 19, 2012

Access my SQL 2005 Express Database using http/https

Hi!

I'm new using MSSql 2005 Express. How can i access my DB using http/https for reporting and DB changes/administration?

Regards,

JP

SQL Server Reporting Services is available through the exposed websites and the appropiate ports. THere is no https support for administration. You will need direct port access to the specified port (by default 1433) for administration of SQL Server.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de

Thursday, February 9, 2012

access denied for user <machine name>\ASPNET

Hi!

I've just started to learn to use Visual Studio, and has come to database access.
I ran into this errormessage:

access denied for user <machine name>\ASPNET

The book I'm using just only say that I have to grant the ASPNET user account permissions before the Web application will have access to a SQL database. ... Seems clear at first glance ... but I lack a "how to" ...!

--

I've tried to search the net for solutions ... several thousands of pages came up ... indicating that I'm far from the first who have this problem. ... So after I now have spend hours reading, without finding any useful ansver to the question. ...

So let me just tell the most popular answers. (So You don't repeat something I allready have read hundreds of times.):
This question has been asked before
Yes, true answer, but it doesn't help.

See the FAQ
If it was stated were in the FAQ to look it could have been useful.

Use something called "enterprise manager" (WIN XP pro, don't have this, though.)
I use WIN XP pro, so that answer dosn't help me either.

--

Hope some one can help.Do you have SQL Server installed on the machine in question? If so, Enterprise Manager will be there (it will run fine on XP pro). You will not have Enterprise Manager if you have MSDE, in which case you need to use osql.exe:

This article explains various ways to work with MSDE. Note that the "Grant permissions to the ASPNET account" is the section to do what you need to do, given your current connection string.|||Yes, I have this osql.exe program. But when I try to use it, it comes up with an access denied error message.

I found another solution to the problem: Moving the ASPNET user from "Restricted user" to "Administrators".

I was a bit hesitant to do this at first (At first glance it appears a bit unsafe to do so.), but when I realized that it is commonly done that way, and when I tried it myself everything did run as it was supposed to. (So ... problem solved!)|||This is areally, really bad idea. The reason MS used the restricted account by default is to make your machine secure. Moving the ASPNET user to the Administrators group is aterrible idea.

Just cause it works, does not mean it is correct.|||Let me reiterate what Doug just said.

Moving the ASPNET user to the Administrators group is a terrible idea.

Don't do it! If someone manages to compromise your server through your website (such as through a SQL injection exploit) they will have unlimited access to run/install/ruin whatever they want on the machine.

Terri