9,022 Topics
Hi, I am new. I have two table like this [code] create table1( ID VARCHAR(10), CONSTRAINT PKeyt1 PRIMARY KEY (ID) ) create table2( ID1 VARCHAR(10), ID2 VARCHAR(10) ) [/code] I want to add foreign key to table2 which ID1 and ID2 is different but referenced same column ID and ON …
Am using Vb.NET 2008 and SQL 2008. I have a problem, when the execution reaches daAdapter.Update(dtTable) then I receive this error ""String or binary data would be truncated. The statement has been terminated"" Then the record fails to update. What could possibly be the error? Below is the complete code. …
Hello, I'm doing a school project in .JSP and I came across this syntax error while inserting data in my database. [CODE] DB Query: INSERT INTO MainApplicant (MainApplicantId,FullName, MaritalStatus, Height, Weight, Gender, AgeAsOfLastBDay, DateOfBirth, PlaceOfBirth, IDNo, CountryOfIssue, Nationality, Race, HomeNo, OfficeNo, MobileNo, Address, PostalCode, CorrAddress, CorrPostalCode, EmailAddress) VALUES [COLOR="Red"]('P-8915710B,[/COLOR]'Jaslyn ', …
Hi All, First of all, thanks for taking time! The problem i've got is the following: I am trying to do an update to a range of data in a field: I've got some products stored in database like this l-aa223221 l-aa2243232fe32 l-aa224322ddew23 I would like to transforms these multiple …
Hi. Intel Xeon CPU 2.40Ghz -- 2GB Ram Windows 2003 R2 Standard edition - (SP 2 applied) SQLServer 2008 Management Studio 2008 (v 10.0.1600.22) I am trying to add a maintenance job using the wizard to perform a backup and I get almost to the end and then I see …
In my application I have to retrieve names from database EMPLOYEE and display on my myPage.jsp page as a list when the page loads. But the problem is that I fail to display so . myPage.jsp [code] <html> <body> <form method="POST" action="/MyServlet"> <p> </p> <p> </p> <table width="13%" align="center" > <tr> …
Hello, I have the following tables: tbl_Products, tbl_Categories, tbl_CategoryFields, tbl_ProductDetailsText tbl_Products houses basic product data, such as ID, CategoryID, Title, Description, Body, Date, Status, etc... tbl_Categories has ID, ParentCategoryID, Title, etc... tbl_CategoryFields has custom fields that the user can add in a CMS for specific categories. For example, Category A …
Dear all, I have 2 tables : [CODE]create table test ( FieldA varchar(10), FieldB varchar(10), FieldC varchar(10) ) and create table test_trigger ( FieldA varchar(10), FieldB varchar(10), FieldC varchar(10) )[/CODE] I create Insert Trigger in test table. Every time test table is inserted new row, automatically inserted in test_trigger table. …
hi there, im coming up with a registration form. i can not connect with the database. im using asp.net(visual web developer) and microsoft sql server as database. in the web.config i came up with these codes; [code=xml]<connectionStrings> <add name="ConnectionString" connectionString="Data Source=.\SQLEXPRESS;AttachdbFileName="|DataDirectory|\Courier Management System.mdf";Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="ConnectionString2" connectionString="Data Source=.\SQLEXPRESS;AttachdbFileName="|DataDirectory|\Courier …
I need to execute the following SQL command from within VB: [CODE]CREATE LOGIN [rx] WITH PASSWORD=N'rx', DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF[/CODE] I've been trying to find info for days but everything always deals with updating tables etc If someone could show me the connection string and have to execute the statement …
hey, I m creating a small project shopping cart....In gridview. I want to add a Hyperlink to each row of GridvIew, & when the user click on Hyperlink(Add to cart),data go to database.. I add a hyperlink code,but the problem is that,it is not firing,To fire the event for hyperlink..I …
Hi, I recently posted a thread asking a certain way to loop through some products in a products table and then recording 4 other (recommended) products for each single product, in a new table. I have done this using a cursor but have been advised that there should be a …
helo guys...i have a table in sql server express edition and 3 fields in it, UserID, Password and Role. I managed to create my login but now i want to add some piece of code in order to give acces according to the role field..that is admin and user will …
[QUOTE] Hi everybody, I need some help with my project. I'm trying to retrieve some data from a combo box on which i used the "data bound item task" so I can select data from a table of my database. the problem I'm having is that when i try to …
hello friends!! Can anyone of you help me know how to make the members of my forum send private messages to each other? I am building a discussion forum for my college students. You can take me as a novice in the field of Asp.net. I am using Sql server …
Hi all Convert(decimal(10,1),(taxid*10)/100) as tax value in taxid is 1. And also im getting .0 result but it should return .1 Plz help me..........why im getting wrong answer.
I have a program that has several forms that uses the same sql data table through the same data source and dataadapter tables. Is this ok if more than one form is being used at the same time which references the same data adapter table.
Does anyone know if it possible to access an Ms-OLAP-Cube and use an MDX-query through JAVA without using XMLA, JPivot or Mondrain. Thanks Declan.
OK.. I'm trying to write a query which combines data from two tables. (I'm pretty novice at SQL Queries, so bear with me!) However, I want to exclude duplicate data (based on just one column -- an address field). Basically, I want to only have one result per address. The …
What SQL statement would I need to join the employees/work orders tables to create the desired output (below)? ++++++++++++++++++++ + employees + ++++++++++++++++++++ + id | name + ++++++++++++++++++++ + 1 | Jim Smith + + 2 | Susie Helms + ++++++++++++++++++++ ++++++++++++++++++++++++++++++++++++ + Work Orders + ++++++++++++++++++++++++++++++++++++ + id …
I am a new for sharepoint, ans there is a task assigned to me in sharepoint. The task is as following: we have a sharepoint site that uses LISTS to store the data, we want this site to use SQL Tables instead of LISTS. I think that this task is …
I hav a program with 2 textboxes in which I hav to display data fields from sql tables and insert values in to table through these 2 textboxes. the program goes like this Dim ds As New DataSet Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load …
Could someone please give me the simplest possible C# code snippets / SQL queries to determine whether: * a given SQL database exists, * a given existing SQL database is accessible, and * a given table exists within a given existing SQL database? Thanks for whatever help anyone can provide.
Hallo, I am getting one error in asp. could you please help me regarding this error. I have created a login window, were i have created a database in sql server named "Data", and one table which have user name and password , the table name is : LOGIN. I …
hi, I am using sql server 2000, but the following error will be occured on open a connection. Pls give solution for this error An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that …
Hello! I'm having the following problem: My application uses an SQL sever, and I entered the connectionstring in a .settings object. It warned me, that it's a security risk, etc. When I publsih my app, two files would be deployed, an .exe and a .config file, which contains all of …
I have an issue wherein the number of fields(columns) in a table exceed 255 in MS Access.ie(370) So i decided to split the tables into 2 diferent table each containing 185 fields. Then before running the QTP script, I join the 2 tables and store them as a view. View …
Hi. I'm a newbie to PHP. I am looking for a PHP login script which uses MSSQL. I've come across a ton of tuts and guides for MySQL, but unfortunately, I do not have an option. [B]I have to use MSSQL.[/B] All the login script has to do is allow …
hi, i m making one asp.net page. in that page there is three text boxes called id, response id, and email. same columns is in sql server table called info. In table "info" for id column i have assigned " isidentity" = yes. its created auto number like 1,2,3..... and …
Hi, I have a DataGridView on a form that is being populated from a SQL table dataset by giving criteria from a previous form. I have 6 columns in the dataset, of which the last column should be combo box column containing items "Done" and "Pending". How do I make …
Hi! Is it possible to run trigger as another user? I'm using trigger to obtain insert info from a database run and to transer the information to our main db. I'm using this automated action just to not having to run a script at determined time or anything, I wanted …
Hello all, I'm currently trying to setup a SQL View that's going to be used to pull info from a table and output it onto a label... Long story short the only piece I need help with is having the SQL view remove leading zeros from one column called "Reference". …
Well, I'm new here but you can halp me also. I have pretty big problem. I need to store large text (more than 8000 charaters) in variable inside of procedure and then execute that query with EXEC command. Problem is that varchar supports up to 8000 characters and text and …
I have a couple of servers. Everyday thousands of records have to be moved to another server. A temporary table is available for each table in the 1st server. Data is copied from the main tables to these temp tables using triggers. I am using a Windows NT service to …
Hello , Am woundering if some one knows where can I find good tutorials to know how to start with sql reporting services ... This is my first time to work with them !!
Hello, Being fairly wet behind the ears with Crystal Reports, I've been struggling with an issue of authentication. I have a Report, that is created in version 8.5....interfacing with a Sql Server 2000 database. I access the report through our company's internal web site. (The website was created in Coldfusion …
I have a database named newbase and columns are 1. Itid 2. Itname 3. Itprice 4. Itquantity I get the sum of the price using itname and the query is [code=sql] select SUM(itprice)as total from trick where itname=’a’[/code] I got the result but now problem is that I want to …
I've been working with SQL2008 AdventureWorks; specifically database AdventureWorks, table Person.Contact. I experimented with using a DataGrid control's DataSource property to add a new project data source to the DataGrid, although my code was written to access the database without using a DataGrid. My code was unable to do so …
Hi all, In a table column, I have this address value: "Muehlgasse 1 86637 Wertingen GERMANY" I want to get only the GERMANY part on my SELECT code. I've tested this code: [code=sql]SELECT right('Muehlgasse 1 86637 Wertingen GERMANY',7)[/code] It works, but the '7' has to be calculated, because we have …
Hello friends, I want to get the row position a table with respect to the primary key.How can I do that?.Please help me!
Hi I worte this code can any body tell me why its not working Error can be seen in the attached file whis…. Value cannot be null. Parameter name : data source Private Sub btnTotal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotal.Click Dim ConnectionString As String = "Integrated …
Hi! I have this table: id table #people 1 ...1 .........3 2 ...1 .........5 3 ...4 .........2 4 ...3 .........5 5 ...1......... 2 i want to obtain the sum of people sitting per table. hope you can help me...
I am having a problem wit searching my database when i click search it says syntax error with FROM Clause. Here is my code n screen shot! Its the code for the find button!! [code]Option Explicit On Public Class Form1 Private Sub DisplaySearchResults(ByVal objectname As String, ByVal FieldName As String, …
I am trying to write a SQL update query for a database column containing an incorrect value. In the JobHistory table (whose primary key = JobID), the ModifiedDt column contains an invalid value, specifically it contains a value from a pickup stop, but I need to use the value for …
I saved a few stored procedures in SQL Server Management Studio. The default Save location, which I accepted, was C:\Documents and Settings\BobLewiston\My Documents\SQL Server Management Studio\Projects. (And yes, each stored procedure was in the form of an .sql file, and I assigned each file name root to be the same …
I know this is a beginner question, but my SQL experience is very limited so I'd like some clarification before I pull the trigger on this. I have a SQL 2000 database who's owner has been deleted. From the looks of it, a long time ago. So now I cannot …
Hi guys, I've been programming for quite a while now and just jumped in to SQL and Stored Procedures due to a Uni project I have due in. I have a table called [B]tblWebsiteMember[/B] and tblWebsiteMember has 2 Columns - [B]ID[/B] and [B]Name[/B] [CODE]CREATE PROCEDURE CreateWebsiteMember @wbmName AS Insert into …
I've written a few SQL stored procedures in a text editor. But how do I actually "store" them in (add them to?) a database using SQL Server 2008 Management Studio Express? I've tried to research this topic in Management Studio's onboard Help, but apparently Help assumes I know more about …
Hi Everyone. Im new in this forum. i need some help about sql, im working in a large company and we have many construction yards in the world we made a program and we are taking backup and restoring test machine, but now we need a automatic system what can …
Question Details: Help Needed Hospital Associates own three private hospitals at different locations across the country. It has a centralize database for tracking patients admission and billing. The database schema contains the following tables: PATIENTS(PatientId, Name, Address,DateofBirth,AccBalance) ADMISSION(AdmissionId, PatientId(FK), RoomId(FK), AdmitDate, DischargeDate) ADMITDETAILS(AdmissionId, TreatmentId(FK), DoctorId(FK)) ROOM (RoomId, HospitalId(FK), RoomType, CostPerNight) …
The End.