Creating Database To Save Ratings Of Articles Given By Users
Aug 11, 2013
I would like to create a database & save to that data base the ratings of articles that are given by the users.
(I want to create a recommendation system.)
I am using joomla! How do I do this ?
View 1 Replies
ADVERTISEMENT
Aug 13, 2015
I'm new to replication and set up a Snapshot Replication on the tables in my sample database. Everything seemed to work (database created on Subscriber instance, jobs set up, etc) but the articles (tables) are not being created in the subscriber's database.
I can see the files created in the folder but I don't see the tables or the data. Also, I confirmed that the articles are checked so they should be included.
View 6 Replies
View Related
Apr 12, 2007
Ok I just installed SQl 2005 for the very first time. I used a service account(domain admin)and Windows NT authentication to install SQL.
Now I am setting up Mcafee EPO on a different server. This application can either install MSDE or use a sql database. I want to use my new SQL server.
What are the best practices to :
a)create database on SQL
b)create a user
c)what permissions to give this user
For example during installation of Mcafee EPO it is asking me name of the remote SQL server, authentication method(Windows or SQL)and the user account.
I am starting to read about SQL but need some quick answers. I need to do the same thing for my SMS 2003 installation. Thanks.
View 4 Replies
View Related
Feb 4, 2008
Hi, this is a bit of background to what I'm trying to achive:
I have an application that creates a new database in MS 2000. The application will then create a login, with then create a user and add the login to the user, it will then add that user to the folling roles; db_owner, db_datareader, db_datawriter.
A SQL script is then run to add tables, view and stored procedures to the new database.
Most of this works however I'm having a few problems with loging in as the new user. Aslo how do I ensure that if new objects (tables, stored procs etc) are added the new user will have full permissions on them?
This is the code I have so far...I'm going round in circles with it and was hoping that someone with fresh eyes might be able to see where I'm going wrong:
Many thanks
1 protected string CreateUser(string strDatabaseName)
2 {
3 //database hase alreday been created
4 SQLDMO.SQLServer gSQLServerDMO = new SQLDMO.SQLServer();
5
6 string serverName = ConfigurationManager.AppSettings["DbsServerName"];
7 gSQLServerDMO.Connect(serverName,
8 ConfigurationManager.AppSettings["DbsUserName"],
9 ConfigurationManager.AppSettings["DbsUserPwd"]);
10 //get the database object
11 SQLDMO.Database dbs = (SQLDMO.Database)gSQLServerDMO.Databases.Item(strDatabaseName, "");
12
13 #region create a login object and populate it
14 SQLDMO.Login login = new SQLDMO.Login();
15 string loginName = strDatabaseName + "_WebLogin";
16 login.Name = loginName;
17 string password = "password";
18
19 login.SetPassword("", password);
20 login.Database = strDatabaseName;
21
22 //check if it exists
23 bool found = false;
24 foreach (SQLDMO.Login ologin in gSQLServerDMO.Logins)
25 {
26 if (ologin.Name == loginName)
27 {
28 found = true;
29 break;
30 }
31 }
32 if (!found)
33 gSQLServerDMO.Logins.Add(login);
34 #endregion
35
36 #region create the user
37 SQLDMO.User user = new SQLDMO.User();
38 //assign the login
39 string userName = strDatabaseName+ "_WebUser";
40 user.Name = userName;
41 user.Login = loginName;
42 //dbs.Users.Add(user);
43
44 found = false;
45 foreach (SQLDMO.User oUser in dbs.Users)
46 {
47 if (oUser.Name == loginName)
48 {
49 found = true;
50 break;
51 }
52 }
53 if (!found)//add the user to the dbs
54 {
55 dbs.Users.Add(user);
56
57 //add user to role
58 //db_owner
59 //SQLDMO.DatabaseRole oRole = new SQLDMO.DatabaseRole();
60 //oRole =
61 //oRole.AddMember(loginName);
62 dbs.DatabaseRoles.Item("db_owner").AddMember(userName);
63 dbs.DatabaseRoles.Item("db_datareader").AddMember(userName);
64 dbs.DatabaseRoles.Item("db_datawriter").AddMember(userName);
65 }
66 #endregion
67
68 string connString = "server=" + serverName + ";database=" + strDatabaseName + ";uid=" + userName
69 + ";pwd=" + password + ";";
View 1 Replies
View Related
Apr 21, 2008
How would I save a users password to a table, change it to a default password and restore it if necessary?
View 3 Replies
View Related
Nov 16, 2005
Dear Anyone,
View 2 Replies
View Related
Aug 7, 2007
Hello Friends
Can any body tell about the database jobs. what are the database jobs and how do they work.
If any body have any link relevant to it please send me as early as possible.
Thanks
SARB
View 1 Replies
View Related
Sep 10, 2007
I'm running into 'CLS-compliance' problems trying to use characters such as "+" and "-" as reporting fields. For example, Standard and Poors ratings have these characters to indicate a notch between main letter rating categories. I have reports that need to display distributions of these various ratings in column charts. However, the X axis labels refuse to print because of these characters!
Any suggestions? This is an awfully common type of labelling in this business!
Thanks
View 1 Replies
View Related
Mar 6, 2008
I have had this issue just pop up. I have local users who can connect fine, but my users that require connection by VPN cannot connect. I get the server not available or access denied error. I did confirm that the VPN'ers are connected to the network correctly and can see that their shares and mappings are correct. Any ideas? Thanking you all in advance!!
View 6 Replies
View Related
Jul 21, 2013
I have a program which brings in Skill ratings for an assesmnet people with the title of "Worker have to take aolng with a file number they are assigned. The program also being in the reporting line that each worker is a part of.
SELECT distinct
o.VP,
o.AVP,
o.Director,
o.Supervisor,
o.Worker,
bs.File_NBR,
[Code] ....
The rating levels are 1 through 5. What I need to do is to do is create a table that shows the count and percentage of each rating giving to the workers for each skill grouped by Vp, AVP, Supervisor and Director. So all the works that are Ultimately under a AVP and all the wokers that are Ultimately under a director and so on.
NameRoleSkillCount of % of Count of % of
Rating 1 Rating 1 Rating 2 Rating 2
Gerald VPA1100 29% 13033%
Gerald VPB195 28% 9524%
Gerald VPB2120 35% 7018%
Gerald VPB330 9% 10025%
KimVPA1
KimVPB1
KimVPB2AND SO ON
[Code] ....
View 1 Replies
View Related
May 1, 2007
Hi All
i WANT to create users for database or sever in SQL SERVER 2005
HOW CAN I GO
Thanks in Advance
Malathi Rao
View 6 Replies
View Related
Oct 16, 2007
hi all,
How can i create a new data table automatically for new users signing into the website.......what i mean here is that i have a predefined database table and i want that users signing in can have that table for them unique , so that they can fill data for themselves and that data will be visible to all just like forums
View 1 Replies
View Related
Aug 17, 2004
I am trying to create a new user for a SQL Server database and use the credentials in an
ASP.NET app.
Problem is dbo permissions are not being applied to the database objects when I set up a
new user (Logins -> New Logins) with SQL Server Authentication, set the default database to
the database I want.
I then get an error message saying that the user has not been granted access to their default
database : DBNAME and therefore will not be able to gain access to their default database.
I'm not sure why this is as I am logged in as sa.
Anyway, when I ignore the error and set-up this new user through the Users section of the
database none of the dbo permissions carry over.
Can anyone help?
Cheers.
View 1 Replies
View Related
Jan 13, 2000
I'm not sure why this is not working, a similar process worked in 6.5 I migrated yesterday.
I restore a database backup from another server. I delete all the users in that database under both Users and Roles, as well as under Security/Logins. Then under Security/Logins I recreate three login and try to reassign them to the appropriate Role. I get an error message: "User or Role already exists in current database". I already deleted that user, the only place he exists is in Public role, which is ok. I don't understand I must be doing something wrong?
Thanks,
Paul
View 1 Replies
View Related
Jul 20, 2005
I have MSDE installed on my sistem, and I need to add a new user.How do I go about doing this?
View 2 Replies
View Related
Jun 13, 2006
Hi,
wanted to add a login in via c# to sql server express.
Is this possible?
I treid this:
String connString = "data source=xtrlt027;Initial catalog=master;Integrated Security=true;"; SqlConnection conn= new SqlConnection();; conn.ConnectionString = connString; try { System.Console.WriteLine("Opening Connection..."); conn.Open(); System.Console.WriteLine("Connection opened!!!"); SqlCommand cmd = new SqlCommand("create login tommtk with Password='tomm2tomm'; use master; create user tommtk;", conn); cmd.ExecuteNonQuery(); System.Console.WriteLine("Login created!!!"); } catch (Exception deleteEx) { System.Console.WriteLine("SqlException Handle :{0}", deleteEx.ToString()); } finally { conn.Close(); System.Console.WriteLine("Connection closed!!!"); }
But i get an exception, that there is an error near the keyword login and the keyword user.So wahts wrongcan anybody help me?Greetz
View 9 Replies
View Related
Nov 28, 2006
Hi Team,
In SQL Enterprise Manager, when we expand "Database -->Users", we see the
users there. When we expand "Security --> logins" we see the same users there.
Can you differentiate these two.
Thanks
Santhosh
View 1 Replies
View Related
Sep 20, 2007
Hi Everybody,
I am trying to setup a stored procedure that runs through a Reminders table and sends an email to users based on DateSent field being smaller than todays date. I have already setup the stored procedure to send the email, just having trouble looping through the recordset.
Code Snippet
CREATE PROCEDURE [dbo].[hrDB_SendEmail]
AS
BEGIN
DECLARE @FirstName nvarchar(256),
@LastName nvarchar(256),
@To nvarchar(256),
@ToMgr nvarchar(256),
@Subject nvarchar(256),
@Msg nvarchar(256),
@DateToSend datetime,
@Sent nvarchar(256),
@ReminderID int,
@RowCount int,
@Today datetime,
@Result nvarchar(256)
-- Get the reminders to send
SELECT
@ReminderID = r.intReminderID,
@DateToSend = r.datDateToSend,
@FirstName = e.txtFirstName,
@LastName = e.txtLastName,
@To = e.txtEmail,
@Subject = t.txtReminderSubject,
@Sent = r.txtSent
FROM
(auto_reminders r INNER JOIN employee e ON r.intEmployeeID = e.intEmployeeID) INNER JOIN ref_reminders t ON r.intReminderType = t.intReminderTempID
WHERE
(((r.datDateToSend)<20/12/09) AND
((r.txtSent)='False'))
-- Send the Emails
WHILE(LEN(@To) > 0)
BEGIN
EXEC @Result = sp_send_cdosysmail @To, @ToMgr, @Subject, @Msg
END
-- Mark the records as sent
IF @Result = 'sp_OAGetErrorInfo'
BEGIN
SELECT @Sent = 'Error'
END
ELSE
BEGIN
SELECT @Sent = 'True'
END
UPDATE auto_reminders
SET
auto_reminders.txtSent = @Sent, auto_reminders.datDateSent = @Today
WHERE
intReminderID = @ReminderID
END
GO
From the code you can probably tell I am new to writing stored procedures, so I apologise for any obvious errors. My major problems are :-
how to loop through each record
how to get todays date
whether the struture of the procedure is correct
Also, if you think there is an easier way or a better method, please suggest it. I am open to any suggestions you may have,
Thanks in advance
Ben
View 1 Replies
View Related
Feb 11, 2006
Hello:I didn't find any documentation that notes save point names are casesensitive, but I guess they are...Stored Proc to reproduce:/* START CODE SNIPPET */If Exists (Select * From sysobjects Where Type = 'P' and Name ='TestSaveTran')Drop Procedure dbo.TestSaveTranGoCreate Procedure dbo.TestSaveTranAsBeginDeclare@tranCount int--Transaction HandlingSelect @tranCount = @@TRANCOUNTIf (@tranCount=0)Begin Tran localtranElseSave Tran localtranBegin Try--Simulate Error While ProcessingRAISERROR('Something bad happened', 16, 1)/*If this proc started transaction then commit it,otherwise return and let caller handle transaction*/IF (@tranCount=0)Commit Tran localtranEnd TryBegin Catch--Rollback to save pointRollback Tran LOCALTRAN --<< NOTE case change--Log Error--Reraise ErrorEnd CatchEndGo--Execute Stored ProcExec dbo.TestSaveTran/*Should receive the following message:Cannot roll back LOCALTRAN. No transaction or savepoint of that namewas found.*//* END CODE SNIPPET */What is really strange, if there is a transaction open, then no erroris thrown. So if you execute as so:/* START CODE SNIPPET */Begin Tran--Execute Stored ProcExec dbo.TestSaveTran/* END CODE SNIPPET */There is no "Cannot roll back LOCALTRAN...." message.Questions:1-)Can someone confirm save point names are case sensitve and this isnot happening because of a server setting?2-)Is this a logic error that I am not seeing in the example codeabove?We have changed our code to store the save point name in a variable,which will hopefully mitigate this "problem".Thx.
View 4 Replies
View Related
Jun 27, 2006
Hi,
I need to save all the DML related queries which is executed in my Database
how can i do it?
what are the possible ways to do it.
View 1 Replies
View Related
May 14, 2007
The XML generated by notifications object needs to be saved. Where do I save it - in the database. That will still be stored in a table - with drawbacks!
View 6 Replies
View Related
Jul 11, 2007
i have an xml file, it looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?><shiporder orderid="889923" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="shiporder.xsd"> <orderperson>John Smith</orderperson> <shipto> <name>Ola Nordmann</name> <address>Langgt 23</address> <city>4000 Stavanger</city> <country>Norway</country> </shipto> <item> <title>My Title</title> <quantity>1</quantity> <price>10.12</price> </item> <item> <title>Hide your heart</title> <quantity>1</quantity> <price>9.90</price> </item></shiporder>
how can i save this into a database(Sql) using a procedure
or..there is another way to do this?
im a newbie
View 6 Replies
View Related
Sep 26, 2005
Hi all,
Can someone please brief me on how to save 'pdf' files(there are about 15 files) into a SQL database and retrieve/open it from a datagrid?
I have about 15 pdf files on my webserver and need to save it in the SQL database, so every pdf file saved in the database will have a primary key and the file will be saved either as 'ntext' or 'binary' type...I just have this rough idea.
If someone has a ready code in VB.net then nothing better( i know thats a shortcut :) but it will help me like a tutorial. C# code will do too, I can then convert the code to Vb.net
Thanks a ton.
View 2 Replies
View Related
Sep 11, 2006
1-I want to save records from a table located in my database1 on Server1 to a non existing table in another database2 in another server2. (The destination table doesn t exist, I want it to be created with T-SQL). How can I do that using T-SQL
2- Also, is there an other better practice to back up my table before I do some dammage inintentially and destroy the table or the records forever or does SQL server do that automatically for us.
Thanks a lot for your advice.
View 4 Replies
View Related
Jan 10, 2007
Hello,
A database EntryForm has a MenuStrip. How could the Menustrip implemented that it would have a Save and Restore data to the database for backup purposes?
What is the Menustrip for? None of the standard Items seems to work. What can be printed or previewed?
This question is NOT about how to save the data into the database from the EntryForm.
Thanks for any answer,
View 16 Replies
View Related
Apr 19, 2006
(VB 2005 Express) I have a textbox linked to a DataTable (database). I want to save its text into the database as a new row. What is the VB code? The following is not working.
Me.Validate()
Me.myDataTableBindingSource.EndEdit()
Me.myDataTableTableAdapter.Update(Me.myDatabaseDataSet.myDataTable)
Thanks for any help.
View 1 Replies
View Related
Feb 19, 2008
Hi,
I'm using Visual Studio and Visual Basic to save data about members in a database.
I use SQL-database as it's included.
However, I'm new to this saving in the datbase and wonder how I can at the best save data about a member without having to index each value in the arrays:
The array has 2 index and is declared
dim Results(6, 50) as string
Of course, I can do results11, results12,... results150, results21, ...results250....
But it seems rather awkward to do it this way. I'm sure that there is a better way.
Thanks, any assistance is appriciated!
Best wishes, Per
View 10 Replies
View Related
May 19, 2006
I had just installed SQL 2005 dev on my laptop and got an error message when I tried to create a package using the BI IDE. I received the same error using VS2005 IDE. But the project was created regardless without any packages. When I tried to create a new package in the project, I received the same error again, but with an option to view the error details.
Following is the text of the error details:
TITLE: Microsoft Visual Studio
------------------------------
Error creating package
------------------------------
ADDITIONAL INFORMATION:
Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".
------------------------------
Failed to save package file "C:Documents and SettingsmyoungbloodLocal SettingsTemp mpD4B.tmp" with error 0x80040154 "Class not registered".
------------------------------
BUTTONS:
OK
------------------------------
I found a similar post that suggested that they try the following:
regsvr32 msxml3.dll
regsvr32 msxml4.dll
regsvr32 msxml6.dll
But msxml6.dll could not be found.
I did get a copy of this file from a coworker, and after copying it and registering it, I was able to add a package to the project.
My concern now is what is the likelyhood of this being the only file missing from the installation.
I'm wondering if I should reinstall, or (if it exists) do a repair on the installation.
Thanks.
Marshall
View 12 Replies
View Related
Jun 26, 2007
I am new to sql sever management studio express, but a long time query analyzer user. This is a very basic question.
I want to change the default directory in sql server management studio express so that when I go to save a query, it is already pointed to the correct one. Where do I change that?
Thanks,
Nanci
View 2 Replies
View Related
Feb 28, 2008
Hi,
I want to upload a file (e.g. .xls, .pdf, .doc) and save into the Sql Server 2000 database through the web interface, and then to download this file. Any idea???
View 2 Replies
View Related
Apr 10, 2008
I have a sql table in which field ExchangeRate is defined as float. When i tries to enter data into ExchangeRate field using LINQ i get follwoing error.
"String or binary data would be truncated.The statement has been terminated."
My code is as follows
ExchangeRate = float.Parse(txtRate.Text)
I tried with
ExchangeRate = double.Parse(txtRate.Text)
I would appreciate any help.
View 8 Replies
View Related
Dec 19, 2004
Hi
I have problem in the data when I save it in database !!!
From Windows Application I Send (nText) Data to SQL Server Database in Web Server but when I try to explore it in SQL Server Enterprise manager or ny SQL Server DB Manager I see the Fields of (nText) Data is empty but when I try to brows the data in ASP.NET page I get it like the following
??? ??? ??? ????? ??????? ?? ??? ??? ?????, ????? ?????? ?????? ?????? ?????????. ????
??????". ?? ????????? ???? ???? ????? ?????, ?? ????? ??????? ??????.
???? ????, ??????? ??? ??? ??????? ?????, ??? ???? ?? ?????? ?? ????? ??????
So I thing the data has been damaged!!
Why this problem... And how can I solve it??
The Problem only in (nText) Data ..
And thanks with my best regarding??
View 2 Replies
View Related
May 1, 2006
Hi !
I am creating a website with a form that users can fill up the
information. This form is about the school's information of the users.
After fill up this form, the users will have to click the submit button
that will submit the form to be saved in a database.
I have created the database for that form. My question is how can I
save the result of this form to my database. Let's say I have 5
textboxes in that form, name, school's name, school's address, major,
and comments.
thanks a lot in advanced!
View 3 Replies
View Related