Showing posts with label program. Show all posts
Showing posts with label program. Show all posts

Friday, March 30, 2012

How can i configure sql server2000 with vb.net2003

Hi

I got an exe file of an application with program debug database.

Once i am running that program it is giving an error.

Can anyone suggest me how to configure SQL server2000 database with this application.

I have installed client tool of SQL server2000 on my system.

I am very new in MS platform.

................................................................................................................................

The error is like this

it is showing this error

System.Data.Sql.Client.qlException: SQL server does not exist or access denied.
at DataAccess.DataAccess.ExecuteInsertUpdateDeleteQuery(String prsConnString, String StoredProcName,sqlParameter[]parameterLost)

Thanks

I'm not exactly sure what it is you're trying to do, but if you want to set up replication using Enterprise Manager (are these the tools you're referring to?) then you should start by reading Replication topic in Books Online.sql

Monday, March 26, 2012

How can I change the default location of full text catalog?

Our current full text catalog default location is C:\Program Files\Microsoft SQL Server\MSSQL.5\MSSQL\FTData, we want change the default location to c:\data\MSSQL.5\FTData, so all the FT catalog will be created in this new location. Can anyone tell me how to do it?

Thanks

ShihChao

See SQL Server 2005 Books Online topic:

CREATE FULLTEXT CATALOG (Transact-SQL)

If you use T-SQL you can specify the path.

The topic states “IN PATH 'rootpath'

Is the root directory for the catalog. If rootpath is not specified, the new catalog will be located in the default directory specified at setup.”

Full-text catalogs must be created on a local hard disk drive associated with an instance of SQL Server. rootpath cannot be a relative path; it must reside on a drive on the same computer.

As you probably know you can specify the path when you use the UI. It does not default to any path.

|||

Also…you can use regedit at your own risk to change the default fulltext path

HKEY_LOCAL_MACHINE/Software/Microsoft/Microsoft SQL Server/MSSQL.x/MSSQLServer/FullTextDefaultPath – specify path

The restart SQL Server service

|||Thanks all all the replies

How can I change the CommandTimeout value?

When I try to execute a query and after 30 seconds the program sends me error :

Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Exception Detail: System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Source error:

Line 550 Dim myDataSet as Dataset = New DataSet

Line 551 myDataSet = db.ExecuteDataSet(System.Data.CommanType.Text,NewSql) <== Error line

Line 552 i=myDataSet.Tables(0).Rows.Count

In my connection string I set the parameter "Connection Timeout" = 360 but it not works. ( In debug mode the value for db.GetConnection.ConnectionTimeout is the same(360) like the parameter timeout connection.

After many searchs I found the default value for CommandTimeout is 30 secs. Can I change this value ?

Any suggestion will be welcome.

I'm using FrameWork 1.1.

create a SqlCommand object and set the CommandTimeout on that.

Hope it helps

|||

Klaus,

Do you have an example or reference in order to get the code?

Thanks in advance,

Juan Carlos

|||

YesOk. I found the example and the solution for my case is :

Dim myDataSet as Dataset = New DataSet

Dim cmd as DbCommandWrapper = db.GetSqlStringCommandWrapper(NewSql)

cmd.CommandTimeout = 180 (seconds) ==> 0 (zero) in order to wait for ever.

myDataSet = db.ExecuteDataSet(cmdl)

i=myDataSet.Tables(0).Rows.Count

If you want to review more of thishttp://msdn.microsoft.com/msdnmag/issues/05/08/DataPoints/

Klaus, I appreciate a lot your help.

Thanks

sql

How can I change the column width?

I'm creating a C# program in Visual Studio. When I query the sql database, the results are put into a data grid view. However, the column widths are always too small when displayed. I have text that is not shown because the column width is not large enough. I tried going into Sql Server Management Studio Express and trying to modify the size property of the columns, but it won't let me change it (its grayed out). How can I fix this problem?Why would you want changing size on the back end server when you need changing size of your grid cells.
You can provide functionality to popup a full text when grid cell double-clicked.

If you'll change backend column size to accommodate your grid size (which is unheard of) you will just truncate existing data in a database and have part of data instead of full set of data.

To limit number of characters returned from a backend to a front end you can use Substring function.

For more help describe your intentions in more detailed and it would be a wise posting it on .NET forum.

Good Luck.

how can I change SQL 2005 Licence key

we have a server installed SQL 2005 with Microsoft Action Pack Product Key,
because we had to install a application program before we got the Licence.
Now we got the Licence and Product Key for this server. Their are two
questions I am wondered.
One is I couldn't find the licence infromation in SQL menues. Where can I
find the Licence information in SQL?
The other is How can I swap the Licence Key in this situation.Do you really need to change SQL2005 license key?
I have never found any need to fiddle with the SQL2005 license key. It's
hard coded in the install media--well, I'm not sure whether that's always th
e
case, but it's always the case where I have dealt with SQL2005.
Linchi
"snailsnail" wrote:

> we have a server installed SQL 2005 with Microsoft Action Pack Product Key
,
> because we had to install a application program before we got the Licence.
> Now we got the Licence and Product Key for this server. Their are two
> questions I am wondered.
> One is I couldn't find the licence infromation in SQL menues. Where can I
> find the Licence information in SQL?
> The other is How can I swap the Licence Key in this situation.
>

how can I change SQL 2005 Licence key

we have a server installed SQL 2005 with Microsoft Action Pack Product Key,
because we had to install a application program before we got the Licence.
Now we got the Licence and Product Key for this server. Their are two
questions I am wondered.
One is I couldn't find the licence infromation in SQL menues. Where can I
find the Licence information in SQL?
The other is How can I swap the Licence Key in this situation.
Do you really need to change SQL2005 license key?
I have never found any need to fiddle with the SQL2005 license key. It's
hard coded in the install media--well, I'm not sure whether that's always the
case, but it's always the case where I have dealt with SQL2005.
Linchi
"snailsnail" wrote:

> we have a server installed SQL 2005 with Microsoft Action Pack Product Key,
> because we had to install a application program before we got the Licence.
> Now we got the Licence and Product Key for this server. Their are two
> questions I am wondered.
> One is I couldn't find the licence infromation in SQL menues. Where can I
> find the Licence information in SQL?
> The other is How can I swap the Licence Key in this situation.
>

how can I change SQL 2005 Licence key

we have a server installed SQL 2005 with Microsoft Action Pack Product Key,
because we had to install a application program before we got the Licence.
Now we got the Licence and Product Key for this server. Their are two
questions I am wondered.
One is I couldn't find the licence infromation in SQL menues. Where can I
find the Licence information in SQL?
The other is How can I swap the Licence Key in this situation.Do you really need to change SQL2005 license key?
I have never found any need to fiddle with the SQL2005 license key. It's
hard coded in the install media--well, I'm not sure whether that's always the
case, but it's always the case where I have dealt with SQL2005.
Linchi
"snailsnail" wrote:
> we have a server installed SQL 2005 with Microsoft Action Pack Product Key,
> because we had to install a application program before we got the Licence.
> Now we got the Licence and Product Key for this server. Their are two
> questions I am wondered.
> One is I couldn't find the licence infromation in SQL menues. Where can I
> find the Licence information in SQL?
> The other is How can I swap the Licence Key in this situation.
>sql

Wednesday, March 21, 2012

HOW CAN I ATTACH DATABASE TO MSDE ?

I am having little problem with it , I am using installshield for setup program and at the end when I finish with msde installation I try to attach a database, I would like to use SQL-DMO , but I dont have much clue how can I do it I need some examples sc
ripts
Thanks a lot
While you can use SQL DMO, it's really easier to simply use ADO or ADO.NET.
When you "open" a database connection against SQL Server and point to the
MDF file, ADO does an attach for you (unless the database is already
attached). This code is from a yet-to-be-published article on SQL Server
Express where I attach a new database to the local SQLEXPRESS named
instance.
Try
cn = New SqlConnection("Data Source=.\SQLExpress;" _
& "Integrated Security=True;Database=Biblio;" _
& "Timeout=60;" _
& "Application Name=SQLExpress Test;" _
& "AttachDBFilename=" & strFn)
da = New SqlDataAdapter("SELECT AU_ID, Author, Year_Born from
authors", cn)
ds = New DataSet
da.Fill(ds)
DataGridView1.DataSource = ds.Tables(0)
Catch ex As Exception
MsgBox(ex.ToString)
End Try
hth
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Robert" <Robert @.discussions.microsoft.com> wrote in message
news:1F642E5F-37AB-4BA7-88DF-5159C607AA0C@.microsoft.com...
> I am having little problem with it , I am using installshield for setup
program and at the end when I finish with msde installation I try to attach
a database, I would like to use SQL-DMO , but I dont have much clue how can
I do it I need some examples scripts
> Thanks a lot
>
|||Hello Robert.
U have said th@. u installed MSDE 2000 using installsheild. How did u do this. Pls help me as im unable to install MSDE itself. Also its givin me a message a strong SA id and password is required.
"Robert" wrote:

> I am having little problem with it , I am using installshield for setup program and at the end when I finish with msde installation I try to attach a database, I would like to use SQL-DMO , but I dont have much clue how can I do it I need some examples
scripts
> Thanks a lot
>

Friday, March 9, 2012

How am I protecting my Database from freign people at my network

as well particular tables in my database should be acceible only for users supply special U/N & PWD within my program

(Windows application - VB.NET)

thanks for referring

You better to have a security policy for your ENV. SQL Server follows two level security architecture. One at server level (LOGIN) and the other at Databaes level (User). You can restrict the permission on objects. you can give access to table(i would always prefer to create view or sp to access table instead of giving direct select permission on table) to individual user or role.

http://msdn2.microsoft.com/en-us/library/aa905172(SQL.80).aspx

http://www.microsoft.com/technet/community/chats/trans/sql/sql0522.mspx

Madhu

Wednesday, March 7, 2012

how about the performance about "sa" a/c?

any consideration of performance issue when i use "sa" a/c to connect SQL SERVER in java program? will be faster or slower?Why do you want/need to use the sa account in your application ? This is a big security issue. This account should only be used in a dba capacity situation - outside of an application.|||my connection string is : xxxxx:1433;DatabaseName=rims;User=sa;Password=xxxx

in my JAVA program, is it wrong? should i use another a/c?

Originally posted by rnealejr
Why do you want/need to use the sa account in your application ? This is a big security issue. This account should only be used in a dba capacity situation - outside of an application.|||Yes. What are you using the connection for ?