9,022 Topics
i have one table.that contains one salary field.I want to find the third maximum row from that field.If anyone knows this please help me thanks
I'm trying to bind to querys and would like to know most efficient way to do it I have these that both need binding as one SELECT * FROM categories ORDER BY categoryDesc and select count(*) as amount from products where idCategory = "&idCat&" and listhidden = 0" idCat is …
I'm so completely new at trying run a local SQL server that it's laughable to watch me try. Anyhow, I made the install to my laptop and it seemed to go okay with no errors or anything like that. When I look in the configuration manager it says that SQL …
Hello, I am thinking of using a partitioned view in my database but i am not being able to find whether it will affect other normal views i.e. if i have a view 'A' consisting of many tables/views and then i partitioned one of the tables into several tables joined …
I have this table (Account) containing fields ID and ParentID. ParentID's value is the ID of the parent account for that account. Now, I set up a trigger that on delete of the parent, all children also gets deleted. But the delete only works one level. I mean when I …
Hi all hopefully I can explain my problem correctly, this is my first post on DaniWeb. I'm currently working on a legacy medical research database that uses a Varchar field to store a decimal number, this field can also be used to store text entered by a researcher on the …
how to import data from excel to sql server using vb.. Thanks
Hi everyone, So I need to find out if a date entered is a Sunday. If it is, I gotta do something special with this data. I'm not sure if Datepart will help or how to use it effectively to extract if it's a Sunday or if it's 1st day …
Hi, I have just downloaded the sql server 2008 version. I am currently developing a web application which is to be uploaded on the internet Now the web application and the database both will be uploaded on the same site .To be precise I am new sql server, whenever i …
I need help with a query. Looking though the forum and other online resources I can usually figure out what I need, but I'm drawing a blank on this one. I have a clients table which has client info in it, and a receipts table with receipt info. what I …
I'm trying to understand the sql connection a little better. I have some code that returns data via a stored procedure on the sql server. Here is the code to execute the procedure and put the data in a data grid: [code]Dim tblSteps As DataTable = New DataTable Dim cnPMSQL …
I have a HP DLT VS160 model tape drive with HP DLTtape VS1(160GB) I made backup of my database on tape drive through windows Backup utility and through SQL server Administration now Please guide me how to access the contents of tape drive and if I want to delete the …
I dont know what im doing wrong, but the dataadapter, doesnt find the table im looking for: Public Shared Function DSet(ByVal ID As Integer, ByVal Name As String, ByVal Address As String, ByVal City As String, ByVal State As String, _ ByVal ZipCode As Integer, ByVal Phone As String) As …
[QUOTE]My following code is only retrives number month(1,2,3,4....12) and not month name(January,February,.....December). Can anyone help me to retrieves month name in sql query. Before that i had try using function datepart, Monthname and date_format but i still din get my answer.Thanks[/QUOTE] [CODE]con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\YS.mdb" con.Open() sql = …
hi i made a login page and created some user. now i like to make a sql queries with that user name. suppose username joe so he enter joe as a user name then login page sent to another page where sql qeries will be execute for that user: joe …
I am new to databases, this is my first attempt at one. I coach a girls softball team and I am trying to put together some useful stats from the tables that I have made. I have several tables of data, 4 or 5 quries, 3 or 4 reports and …
Hi all! Okay i've been attempting to create this segment of code which is supposed to read from the database; based on search criteria entered, then load them into a form for viewing/editing. I am able to read the concessionID from the database; however i am then unable to select …
hello to all, I am using MS SQL 2005. I have 3 tables, COLLAGE, USER, STUDENT I am providing username & password to collage as well as students. I wanted to assign Foreign Key to 'username' in both tables College & Student. i have done, 1. right click on username …
Does anyone know if its possible and/or practical to set up database mirroring between two MS SQL 2005 servers that are on completely different networks? The bandwidth between them is around 5mb and asynchronous would be fine. Thanks in advance, Avi Reiter <URL SNIPPED>
i am passing values to stored procedure from .net through command parameters.when i pass values like string City="'Lucknow','Kanpur'"; Com.Parameter.AddWithValues("@Cities",City); create procedure SPGetState @Cities varchar(2000) As Select * from Temp Where City in(@Cities) i can't get the result.But i run this in Sql Query Analyzer ,i get the result.What;s the problem,i …
Hi there. Im new to asp programming. And I am doing a research project for my school. I'm create a website with MS SQL SERVER 2005 with ASP. But the problem is the right connection. I have searched the web almost 2 weeks but nothing happened. Here's what my code …
Hi, I don't know how exactly how to do this. So for example I have the following set of data: Table: tbl_country_costs Country Type Cost North America Sales 2000000 North America Expenses 1250000 North America Taxes 250000 North America Profit 500000 Europe Sales 2500000 Europe Expenses 1250000 Europe Taxes 500000 …
Hello Everybody, I use different forms....I want to send a value like form1 to form2.for example textbox1.text value, I want to send it to myStr in form2. I tried public static but I could not solve it. Also another problem is this. There is 3 forms. If form1 sends a …
Greetings - I'm wondering if anyone can assist me with troubleshooting. When I login, my page displays the heading, but not the user record (formview). I am using the default membership and users tables (SQL server 2005) along with the basic login control. I have a table called 'members' where …
I have some App using Visual studio 2008 and C#. some small App that im working on during my college study. (still student) I need to show in datagridview all the results (the App deals with cars rent) for Available cars between 2 dates. In the DB i have table …
Can someone help and show me how to display using (VB.net) these two tables combined into one. I'm really struggling trying to figure this out after hours of work, I decided its time to ask for help! So in SQL Server 2005 I have the following tables... [B]Students[/B] PKId Cart_Id …
Hello. My project required me to search the record inside the database. What I mean is I save the text field of a session like Session["Example"] = "ex". Then using this session to search inside the field of table of SQLDataSource. If the session match the field, then display the …
Hi, I have setup the MS SQL 2000 database and setup one form for insert query to insert some personal details. But the when the detail contains special character like #,?,=,/ etc.,, database throws the error message. Like: Some details withspecial character # sp. # How can I resolve this …
Not quite sure whether this is a question for the server side programming forum or for SQL forum. Nevertheless, here it is: What is the best way to update a record when 2 users of my site happen to edit it simultaneously? For example, assume the following scenario: Let's say …
:'( Hello everyone, i wrote an application that makes database backups and zips them. Can anyone please tell me what i need to do in order to get the apllication to work on IIS 6 windows server 2003 SQL 05 1. The application works fine on machines for both XP …
Hi, I want to pass cid genarated in selling.aspx to orderform.aspx . How to retrieve the query string in orderform.aspx I gave the code below in selling.aspx [code]SqlConnection con; SqlDataReader dr; con = new SqlConnection("Persist Security Info=False;Uid=sa;Password=q1w2e3/;Initial Catalog=YOGADATA;Data Source=PC-1"); con.Open(); t=0; SqlCommand com = new SqlCommand("select * from Custlogin", con); …
i have the following Query , i built it in sql server 2008 query builder [code=sql](SELECT CourseNo FROM ppu_RegistrationInfoDetailes WHERE (StudentNo = @StudentNo) AND (SemesterNo = (SELECT TOP (1) SemesterNo FROM ppu_RegistrationInfo AS ppu_RegistrationInfo_1 WHERE (StudentNo = @StudentNo) ORDER BY AcademicYear DESC)) AND (AcademicYear = (SELECT TOP (1) AcademicYear FROM …
[code=c#] I created a new crystalreport1.rpt , and also created a new DataSet1.xsd . For the crystalrepor1.rpt i have the given DataSet1.xsd as datasource . Now in the default.aspx i want to create a dataset of my requirement and assign that to dataset1.xsd and bind this to crystalreportviewer control which …
hi every body. i have a stored procedure with a select statment that looped by a cursor . this is the code [CODE] DECLARE res cursor READ_ONLY for (SELECT DISTINCT GroupNo FROM ppu_MajorPlan WHERE (PlanYear =(SELECT majorPlanYear FROM ppu_Student WHERE (StudentNo = @StudentNo))) AND (MajorNo =(SELECT MajorNo FROM ppu_Student WHERE …
Hi guys, im trying to insert data in different tables one after another, the first table is "Account" with P_key "Username" then have another table called "Student" with P_key "Alumnus_no". Username is a foreign key on "Student" table meaning in order to enter records on Student table Username must exist …
Protected Sub subdata(ByVal id As Integer) Dim myDataReader As System.Data.SqlClient.SqlDataReader Dim myConnection As New SqlConnection Dim myCommand As New SqlCommand Dim strSQL As String strSQL = "SELECT class_id,subject_id,subject_name FROM subject where subject_id =@class_id " myConnection = New SqlConnection(" Data Source=SAJJAD;Initial Catalog=ac;Integrated Security=True") myCommand.Parameters.AddWithValue("@class_id", id) myCommand = New SqlCommand(strSQL, myConnection) myConnection.Open() …
Hi, I have been set a task that takes data from an SQL server and displays it to a 'Wallboard' (a large plasma screen on the wall). I'm just wondering what everyone thinks the best solution would be? Web-based, windowns form based etc. Another quick question, upon loading Visual Studio …
Hi I have proble to figure up how create databaze schema for text localization. My problem is like i have table with Towns and i need to localizate it to diferent language. Something like London - Londin and so on. Problem: The problem is that i cant create FK to …
Hello all, what i wanted to ask is, if someone does know how to [B]Serialize[/B] or [B]mark as Serializable[/B] a [I][B]Microsoft.SqlServer.Managment.Smo.Table[/B][/I], because when i try to add an instance of a smo.Table to Viewstate, it throws me the following error: Type [I][U]'Microsoft.SqlServer.Managment.Smo.Table' [/U][/I]is not marked as Serializable. Thanx in advance …
Hello all, I want to create a stored procedure using [B][I]SMO Objects[/I][/B]. I have set up all the properties of my Smo.StoredProcedure object, but when i try to create it, it throws me this Exception Message: [ICODE]Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch[/ICODE] Here's a little …
[QUOTE]I am facing the problem in select the item dates. This is because i only want the condition of month from table dates. So i think the data set i write it get the error. Any one can help me,Thanks.[/QUOTE] [CODE] con.Open() sql = "SELECT DISTINCT Month(dates) FROM summary WHERE …
hello everyone. i'm a newbie to ms sql but i understand the basics of adding tables and linking them. i have two tables tables that i have linked; Department and Employee. The Department table is the main table with a foreign key in the Employee table. now from by basic …
Hi i want to get contact details from outlook and display that contact details in my datagrid view using csv file. My grid view display only few columns such as Name, Address, Email and category. In outlook i will add the contact details such as First Name, LastName, Business address …
Hi all; i'm trying to connect my program to an SQL Server Express database... however i am just getting an error that simply states: "Login failed for user 'sa'." Within my code this appears on: objConnection.Open() my code so far is: [code] Imports System.Data.SqlClient Imports System.Data Private Sub Form1_Load(ByVal sender …
i am using visual studio2008. the submit coding show temporay storage of data on form but it is not inserting into the data base. On the other hand sql server authentication show permanent submission.
I have some textbox to send one word to sql database. i want to fine this word in a coulmn that holding few words. i cant figure it out what the correct queary iv'e try the LIKE statement in many ways but still nothing. The word can be at the …
Hi Friends, I am facing a very bad problem.I have added an SQL Database using VS 2005>>Add New Item>>Sql Database.The problem I am facing is not able to execute an INSERT or UPDATE.But the thing is that just after inserting and viewing the contents of the same table in the …
Hello, im tryin to build some simple application using C#. im using the datagridview + the binding navigation. when im runing the app im available to delete and editing rows. after i click the save button its look like the app is saved the updates as long as the app …
Hey Guys, Can you please tell me which version of SQL Server is compatible with Vista. I have a Vista Home Premium Service Pack 1.
Hello all, i am trying to put table column to array using Visual Basic 2008 form. As i do not need to update back values to database i have used DataReader. [CODE] Private Sub Button1_click (,,,,,,,,,,) Handles Button1.Click Dim cn As String cn="Data Source='C:\Temp\DB\DBaze.sdf' " Dim qry As String = …
The End.