|
Ohh so that is better than mine? Cool...
CleaKO
"I think you'll be okay here, they have a thin candy shell. 'Surprised you didn't know that." - Tommy Boy "Fill it up again! Fill it up again! Once it hits your lips, it's so good!" - Frank the Tank (Old School)
|
|
|
|
|
I sort of figured that it wouldn't work. It would be a shame for something to be easy once.
Does linking the SQL Servers only work if they are on the same machine? If not, could you give some keywords I can do some searching with. There's no reason to be humble about my ignorance now
Thanks for your help.
OT: I see you are from Glasgow. Any ideas for some good day trips for someone visiting? I've been there twice last year for work and will going back at least once this year.
Brad
The secret to creativity is knowing how to hide your sources. - Albert Einstein
|
|
|
|
|
BRShroyer wrote: Does linking the SQL Servers only work if they are on the same machine?
You can link any SQL Servers together.
BRShroyer wrote: could you give some keywords I can do some searching with
Your starter for 10: sp_addlinkedserver[^]
BRShroyer wrote: I see you are from Glasgow. Any ideas for some good day trips for someone visiting?
Loch Lomond, Isle of Arran (aka Scotland in Miniature), Edinburgh (45 mins on the train), Falkirk Wheel.
|
|
|
|
|
Hi guys,
Please help,I am having an issue with data access block connection to the database from my class library project.
using the data access block to connect to database works fine in my website project. but i try creating a separate class library project to connect to the database i now receive an error message.
"The value can not be null or an empty string."
and this is the code:
<br />
Database motomandb = DatabaseFactory.CreateDatabase();<br />
DbCommand motomandbCommand = motomandb.GetSqlStringCommand(query);<br />
<br />
using(DbConnection motomanConnection = motomandb.CreateConnection())<br />
{<br />
DbTransaction motomanTransaction = motomanConnection.BeginTransaction();<br />
try<br />
{<br />
rowsaffected = motomandb.ExecuteNonQuery(motomandbCommand, motomanTransaction);<br />
motomanTransaction.Commit();<br />
}<br />
catch (Exception e)<br />
{<br />
motomanTransaction.Rollback();<br />
}<br />
}<br />
thanks in advance
|
|
|
|
|
any one here for giving me help that i get a problem to store store jpg files in sql or oracle (blob).
please
i am student of ignou .
|
|
|
|
|
Please post the complete error / problem details.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
|
I am making an control which saves xls file in database attached by user. file size will be of 3 MB and there will be 3 such files. Can someone please help me and tell me how can i directly save the file in database rather then saving it in some location on server.
Ram shankar tripathi
Software Engineer
Telstra
Australia
|
|
|
|
|
I have the next problem: in the table with the primary key field "ID" (it is identity with automatic incrementation) when I delete row, the row isn't completely removed - the ID field remain (although it looks like row was removed) - and as a result, next created row has ID wich is equal to ID of previous deleted row + 1. How to delete row from table with autoincrement primary key correctly?
...fear makes people manageable...
|
|
|
|
|
When you have an identity column you do not get deleted id's back. If you delete all rows from the table and want to reset the identity back to a value you need to do this:
DBCC CHECKIDENT('TableName', RESEED, 1)
Hope that helps.
Ben
|
|
|
|
|
|
Noob question:
If I have several (4-5) computers with SQL Server 2005 Express on them, can they all access the same database file located on a remote/network drive? Would they be able to access it at the same time?
Brad
The secret to creativity is knowing how to hide your sources. - Albert Einstein
|
|
|
|
|
No.
SQL Server opens the file exclusively and controls it completely. Only one instance of SQL Server can open a database file. Also, the files must be on the same physical machine as the SQL Server.
However, you can link SQL Servers together so they can share the data. The SQL Server that owns the file will control all access to the data.
|
|
|
|
|
Hey everyone,
I am working on this project, mostly database driven.
this is what it is about:- The user interface is install on three computer in different location while the database is kept on another computer in a seperate location, which means all three computers has to connected to this sql server to enter and retrive data. That means if the server goes down.. neither of these location will be able to continue there work.
What i am thinking about now, is to install sql server on all three machine so that data is stored at each location and at the end of each day all the data from the three location would be uploaded or Synchronized to the main database.
Problem.. how do i get all three database to Synchronize with the main database? Do i have to hard code this to happen or is there a feature that does this in sql 2000...
your help would be highly appreciated...
thanks.
Nab
|
|
|
|
|
|
Hi, I am trying to generate a typed dataset with an xsd schema, but I seem to do it only half right.
In one application, I read my MySql database (4 data tables) into a simple dataset, I define the relations and I export it with the WriteXmlSchema method. This works fine.
Then, I import my newly created xsd file to another project, in which I want to create a typed dataSet. In this project, I'm able to view my schema, and when I right-click and select Preview DataSet, everything looks great, I have my 4 tables and all the Properties are shown.
However, when I select Generate DataSet and go write some code, I only have one table for which a FindBy method has been generated. No property is defined in my other 3 tables.
Can somebody please help me, this is driving me nuts!
Thanks!
-- modified at 10:27 Wednesday 14th March, 2007
|
|
|
|
|
Hi,
I am doing a project that involves Ms Access database connectivity in vb.net.I can do the insertion and updation of record by the code as mentioned below:
Imports System.Data.OleDb
Public Class Form2 Inherits System.Windows.Forms.Form
Dim cn As OleDbConnection
Dim cmd As OleDbCommand
Dim dr As OleDbDataReader
Dim icount As Integer
Dim str As String
Private Sub Add_Click(ByVal sender As System.Object, ByVal e As_
System.EventArgs) Handles Button2.Click
Try
cn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\emp.mdb;")
cn.Open()
str = "insert into table1 values(" & CInt(TextBox1.Text) & ",'" & TextBox2.Text & "','" &_
TextBox3.Text & "')"
'string stores the command and CInt is used to convert number to string
cmd = New OleDbCommand(str, cn)
icount = cmd.ExecuteNonQuery
MessageBox.Show(icount)
'displays number of records inserted
Catch
End Try
cn.Close()
End Sub
End Class
Updation of records
Me.BindingContext(ds, "Employee").EndCurrentEdit()
Me.da.Update(ds)
But I cannot do the saving and deletion of record.I would be very thankful if anybody can help me out in this difficulty.If possible plz provide me the code.
Thanking You.
Romana Sayed
|
|
|
|
|
Make sure that you have dataadapter update command specified. This might prevent updation using dataset
|
|
|
|
|
Hi ,
If u can plz provide me the code for click event of a button(ie save or delete).I am not able to delete record from an access database using OleDb provider.
|
|
|
|
|
Hi,
I'm trying to experiment with the newest version of former 'sql everywhere' and found the following problem (the way to reproduce in VS 2005, SP1):
1) in 'server explorer' I made new database (sdf file) with a couple of tables an some columns
2) new c++/cli project, trying to add new datasource project
3) select table(s) in the wizard ... everything guess goes well ...
4) on the stage of creating dataset:
Creating DataSet class using XSD ...
Writing file 'c:...DataSet.h'.
Error: There was an error processing '.\...DataSet.xsd'.
- Error generating code for DataSet ''.
- Failed to generate code. Failed to find or load the registered .Net Framework Data Provider. Failed to find or load the registered .Net Framework Data Provider. <---- ?!?!?!
Oops, dataset.h file is absolutely empty Has anybody experienced same problems?
Dmitry
|
|
|
|
|
Hello
I have one table say table1. I want to restrict deletion and updation for this table. Any idea ? I use SQL Server 2000
|
|
|
|
|
Use REVOKE[^] or DENY[^]
e.g.
DENY UPDATE ON [TableName] TO [UserNameOrGroup]
DENY is more final. REVOKE just means don't permit it for a user with this role unless some other role they are a part of grants the permission. DENY means no access at all regardless of what other roles the user has.
|
|
|
|
|
Hello
Thanks, I tried your suggestion. It was not working. I am working on a user id called 'navaneeth'. So i tried this
DENY UPDATE ON MYtable TO navaneeth
Then i tried to update. It was updating ? Where am I wrong ?
|
|
|
|
|
DooDooo wrote: Then i tried to update. It was updating ? Where am I wrong ?
It is possible that you are trying to deny access to an object you already own. If I remember correctly, you cannot deny yourself access to your own objects.
If this:
SELECT USER
returns the same value as the TABLE_SCHEMA column in this:
SELECT * FROM INFORMATION_SCHEMA.TABLES
for the corresponding table, then that's your answer.
|
|
|
|
|
PlayByTheRules wrote: returns the same value as the TABLE_SCHEMA column in this:
SELECT * FROM INFORMATION_SCHEMA.TABLES
for the corresponding table, then that's your answer.
Yes that was the answer. Thank you very much
|
|
|
|