|
Hi All,
I have an application (windows forms with .Net 3.5) that is making use of an SQL Server 2008 database (which is installed of a server machine on the network).
Communication between the two is done with the use of System.Data.SqlClient classes.
Now my installation of the application is working fine. But i have alot of things installed on my machine such include a version of SQLExpress which presumably came with a few components required for database connections.
Basically my question is, if I had a freshly installed OS on a brand new machine. What would i need to install on the local machine in order to get my application to work correctly with SQL Server 2008? Naturally i will be installing .Net 3.5 framework. But do I need any SQL drivers/services on the local machine?
Thanks
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
As far as I understand, the .net framework runtime provides everything you need to connect to the database, although I'd run a few tests on your target OSs before deploy!
"An eye for an eye only ends up making the whole world blind"
|
|
|
|
|
Thanks for the reply.
I did think that was all required as I seem to remember reading something a while back saying that the server installation of SQL Server 2008 installs the required services and local machines can simply talk to them with no addition drivers. I just couldn't find any conclusive documentation on this.
And don't worry, It will be thoroughly tested before release Which will ultimately answer my question if anything else is required... but that's not for a while yet.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
hi all,
i want to install SQL server Express 2005 programmatically. so i use following statement
str = Application.StartupPath & "\SQLEXPR32\setup.exe /qb ADDLOCAL=ALL INSTANCENAME=" & InstanceName & " SECURITYMODE=SQL SAPWD=password DISABLENETWORKPROTOCOLS=0 "<br />
Shell(str, AppWinStyle.Hide, True)
above code works well. but when i try to Create backup pro grammatically, then it create backup only in Backup folder of SQL server. if i specify other path(other then Backup) then Backup process failed.
Please suggest
|
|
|
|
|
Hey everyone,
Any good experience on installing Oracle on Windows Vista?? I'm running "Vista 32-bit Home Basic"
and I just cant install Oracle 10g, Oracle says I have to get a 10.2.0.4 patchset or higher which I cant lay my hands on because I'm no Oracle Partner and my country is not even listed there
Please advise!
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
You can install Oracle on 32-bit Vista.
If you do not have a support contract, you cannot get patchsets such as 10.2.0.4 or any other type of product update. You can only install the products that are available as downloads on OTN. Everything else is in MetaLink, which requires payment for support.
Kind regards,
Russ
|
|
|
|
|
hi all,
i want to create backup of my database (related to SQL server Express 2005) from .NET application. Application is install on SERVER and some Client computer(which is connected to SERVER). I want to create backup from SERVER and client.
for backup purpose i use following statement
Dim cmd As SqlCommand<br />
cmd = New SqlCommand("Backup Database abc to disk = @BackUpPath")<br />
cmd.CommandType = CommandType.Text<br />
<br />
Dim RootPath1 As String = DestinationPath 'Path for create Backup<br />
Dim shellCommand As String = RootPath1 & "abc.bak"<br />
cmd.Parameters.AddWithValue("@BackUpPath", shellCommand)<br />
ExecuteRestoreCommandQuery(cmd, "master")
and this is the procedure ExecuteRestoreCommandQuery
Private Sub ExecuteRestoreCommandQuery(ByVal comm As SqlCommand, ByVal DatabaseName As String)<br />
Dim con1 As SqlConnection = Nothing<br />
Try<br />
con1 = New SqlConnection("Data Source=" & PublicServerName & "\" & PublicInstanceName & ";Initial Catalog=" & DatabaseName & ";User ID=sa;Password=password")<br />
comm.Connection = con1<br />
con1.Open()<br />
comm.ExecuteNonQuery()<br />
con1.Close()<br />
<br />
Catch ex As Exception<br />
msgbox(ex.Message.ToString)<br />
If con1.State = ConnectionState.Open Then<br />
con1.Close()<br />
End If<br />
End Try<br />
<br />
End Sub
but when i run above code then it Gives error
"Can not open backup device" path ... Operating System Error 5(Access is denied.). BACKUP DATABASE is terminating abnormally."
so how can i create backup from application which is installed on SERVER and CLIENT.
|
|
|
|
|
Are you sure that the account that SQL Server is running under has write permissions to wherever you are trying to back up to?
Scott
|
|
|
|
|
scottgp wrote: Are you sure that the account that SQL Server is running under has write permissions to wherever you are trying to back up to?
no idea about this thing.
How can i find that whether any account have write permission?
BTW i use sa account for create backup
|
|
|
|
|
You may be connecting as sa, but I believe the backup is actually executed by the account that the SQL Server service is executing under. What version of SQL Server are you using? If it's 2005, you can use the SQL Server Configuration Manager to view and change what account it's using, or you can use the Services tool under Administrative Tools.
Scott
|
|
|
|
|
scottgp wrote: I believe the backup is actually executed by the account that the SQL Server service is executing under
how can i get the information about the account?
scottgp wrote: If it's 2005, you can use the SQL Server Configuration Manager to view and change what account it's using,
yes it is, It is Built in Account under which network service is selected.but how it affect backup process?
|
|
|
|
|
I guess the question is - does the Network Service account have access to whatever RootPath1/DestinationPath is in your code? Is DestinationPath on a network somewhere?
Scott
|
|
|
|
|
one more silly question
scottgp wrote: does the Network Service account have access to whatever RootPath1/DestinationPath is in your code? Is DestinationPath on a network somewhere?
how can i find whether it is have access to given path?
however an Access denied message is appear when i select any path except Backup folder of SQL Server
|
|
|
|
|
The normal way that you check permissions in Windows. Right-click on the directory in Windows Explorer to bring up the context menu and select properties. Then select the security tab. You can then add the Network Service account and grant it write permissions. Alternatively, you could run SQL Server under another account - one that already has write permissions.
Scott
|
|
|
|
|
I'm using SQL Express server and i linked table in the db with table in the dataset
which is linked with gridview
and i write procedure to insert records to the table in the database but the grid does not display the new records
why?
|
|
|
|
|
Hi, can you post your code?
Hope this one can help.
Thanks
Hi, Please select Good Question if my answer are fit to your Question.
|
|
|
|
|
Hi All,
Is there a way that i can convert nonnumberic nvarchar to float, such as: Convert(float, 'H1234), I searched on net, even msdn says "SQL Server returns an error message when nonnumeric char, nchar, varchar, or nvarchar data is converted to int, float, numeric, or decimal".
Thanks heaps.
|
|
|
|
|
I have to say, this is one of the most ridiculous questions I have seen in a long time - and there are some pretty stupid ones posted here. How do you expect to turn non-numeric data into a number? What do you expect to get from H1234?
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
what the f... r u talking about, dumb sick c***? Any realistic is from ridiculous thougt, such as ages ago ppl was saying that the Earth is round rather than square. If you idiot don't know, that's fine, jut get the f... out of here, you, MVP?, my goddness, where does this sort of rubbish come from?
|
|
|
|
|
So why don't you answer Bob's question instead of resorting to abuse?
If you had done so you might have got the help you asked for.
Regards
David R
|
|
|
|
|
I did resolved the problem, but without his help at all. I don't like abusing ppl at all, but if someone wants to bad mouth anything, I won't be silent. That's my rule.
|
|
|
|
|
AndieDu wrote: what the f... r u talking about, dumb sick c***?
If thats your attitude to a little sarcasm then don't expect my help.
AndieDu wrote: Any realistic is from ridiculous thougt, such as ages ago ppl was saying that the Earth is round rather than square
Whats that got to do with anything?
AndieDu wrote: If you idiot don't know, that's fine
And if you explained your problem then I probably WOULD know the answer, but complaining because you cannot convert H123 to a float is just plain stupid.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
I just don't like the "stupid" word, did you understand, and guess what i already did sort of convert H1234 to what I need to do, which was H1234 + 100 = H1334. You don't have to taunt anyone here as I am pretty here are lots of fresh ppl here, you can just simply say: "well, this is not possbile, but there might be other ways to work around and you just need to post the full context with your problem." this is much easier and nicer rather than taunting someone. Do you think you deserve MVP in here? at least I doubt.
|
|
|
|
|
Hi All,
I'm making some schema changes to an SqlCe 3.5 database and have a question about the best method to store these types of values.
Currently the DB stores a path "C:\directory1\directory2\" and a file name "filename.ext" both in NTEXT fields.
This seems wrong and cumbersome but due to NVARCHAR being limited to 255 (and NTFS MAX_PATH being 260) it seems the best solution is to use three nvarchar fields.
NVARCHAR[3] "C:\"
NVARCHAR[255] "directory1\directory2\"
NVARCHAR[255] "filename.ext"
One thing I did notice was the "Edit Table Schema" dialog in C# Express allowed me to make an NVARCHAR[500] field and didn't throw any errors ... is the NVARCHAR character limit in 3.5 SP1 higher than 255? I can only find details on the data types for SqlCe 2000 ...
http://technet.microsoft.com/en-us/library/aa237918(SQL.80).aspx[^]
Cheers,
|
|
|
|
|
Unless you need to support unicode data in your table(s) the use VARCHAR. Nvarchar is a default and IMHO a complete waste of time if you are using English as your data language. I think the default should be reveresed to use varchar and allow it to fail when a unicode character is inserted. The DB designer should know enough to make an informed decision.
We usually store the folder and filename separate and always use UNC path format for any network drive.
Never underestimate the power of human stupidity
RAH
|
|
|
|