9,022 Topics
I have a question I want to query a datamart with transactional data. I have 3 fields the unique one is the product. I want to get a query where i set a number from the range of how many unique item there is on field three against field 1 …
I need to display multiple fields but need to restrict by the last entry for each individual. SELECT SSAN, Location, Date_of_Trip from TblTRIPS Where ...only want to select the most recent trip Need help with this. How can I restrict the select statement to the most recent trip for each …
Hi Sir, I was trying hard to get the image on the Crystal report when the user selects the formid from aspx form in .net. Kindly let me know how to save the image in the database by coding so that whenever I select the formid the image should display …
I am doing fyp with rfid student attendance system currently. And, I face the problem on saving the database's data.This is the code that i write below: [code] Dim sqladapter As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter("select * from table_0", conn) sqladapter.Fill(ds, "table_0") Dim sqladapter_1 As SqlClient.SqlDataAdapter = New SqlClient.SqlDataAdapter("select * from …
hie if you could help me out i'll be forever grateful!! okay i am creating an ordering system but when i try to add a new customer it allos me to add but it doesnt save to the database and i can not also call it up the code i …
Hi, I hava 1 error in accessing database using javabean in jsp(jsp custom actions).The error like this javax.servlet.ServletException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt my source code is given below.Anybody help me?? [code=java]package SQLBean; import java.sql.*; import java.io.*; public class DbBean implements java.io.Serializable{ private String …
hi members,i was asked to design atimesheetmanager as atask in school using asp.net MVC,SQL server,jquery i am eager to your advice about the entire program and how each language used thanks
I'm creating a material management website i need to search a record from sql server 2005 and have to update or delete it.I used ado to connect to server
I'm sure I'm missing something that is fairly easy, but I can't get it to work. I have a SQL Update Stored Proc. In this SP, the Primary Key can be modified. So, First I check if the PK is changing, then if it is, I check to see in …
hi here i wants to show the room numbers by using the following code but it is not working. here iam giving the code plese give the proper coding [CODE] Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) conn.Open() Dim da As New SqlCommand("select room_no from guesthouse where room_no not in(select room_no from …
So I have a bit of a problem... A la I am posting on this forum. If you will bare with me for a short narrative I can explain the situation. Currently a department in my school is involved in a Weather data collection project which they have asked me …
Hi I have a table with two columns (ID,ROW) I need to make the ID COLUMN unique and increase it value by 1 for each row. ----------------------- ID ROW 1 NULL 1 NULL 1 NULL 1 NULL How can I replace the each 1 with sequentially increased value? to be …
Dear Experts Table1 has following data date----------weight 14/01/2010------5 14/01/2010------10 15/01/2010------20 02/02/2010------35 I use followin query [CODE]str = "SELECT RANK() OVER(ORDER BY date) AS sno ,date, SUM(weight) AS weight FROM table1 GROUP BY Date" dt = GetTable(str) [/CODE] The query generates these results 1----02/02/2010------35 2----14/01/2010------15 3----15/01/2010------20 This is not order by …
hello please help me on the sql statement on how to display in descending order example select*from my_table......please help whats the next of it i want to display in descending order....also please give me what are the sql statement so that i can be familiar of it ..hoping for your …
Hi folks, I'm developing an AI system in C# that will pull out information from the internet in various forms and learn from it. The system will consist of a multitude of agents that interact with a very large central database of knowledge. At the moment I'm at the prototyping …
hi i have a problem if any one can help me please. i have 2 tables in Access database- Drug_Name and Chemistry. i have to retrive the from DB to the ASP. the Drug_Name has Drug_ID, D_name, Synonyms as the fields. once the user write a name it should check …
[code] public partial class QuestionPage : System.Web.UI.Page { string scon = "Data Source=RBWORKSTATION2\\SQLEXPRESS;Initial Catalog=onlineexamdb;Integrated Security=True;MultipleActiveResultSets=true"; SqlDataAdapter da; SqlCommand cmd; DataSet ds; SqlConnection con; ArrayList myArrayList = new ArrayList(); public String ques, option1,option2,option3,option4; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlConnection con = new SqlConnection(scon); con.Open(); da = …
All, I need help in deciding what coding language would be easiest to use for a project (read below): So at work we have a scheduling system that is SQL based. The programmers already have all the code in place to parse the database into an excel sheet with columns …
Hello everyone, my task once again is to design a video rental database. I have done all i need to but but am having problem in getting the due date. from the dateRented and DueDate. what query or code will i use? i will appreciate an urgent reply Thanks Y'all.
Beginning development with SQL Server 2008, VB - Visual Studio 2008 on an application that will deploy laptops remotely for 6 months or more. The laptops will have no network or internet connection. There is a requirement to sync DB changes via shipment of USB flash drives. The remote app …
Hey Brother, I have need to create new table into new database from exist table of old database. So how I can copy that much table into other database. I have tried below code. but it give error at "IN". [CODE] SELECT * INTO dbo.pqrnew IN "NewDatabase" FROM dbo.pqr [/CODE] …
I am writing a bug tracking system and this is my first time using .NET. I will have a SQL database to store the bugs but I want to have a table on my main screen that will list the bugs from the SQL database and when the bug is …
OK, this may not be possible in SQL, but here goes. I'm writing an app that allows the end user to select a date range and filter by area code, but I want them to be able to select as many area codes as they want. My question is with …
It's been a while since I've posted. Things have been going well for my project, but I'm coming back to the issue of setting up a SQL server on my user's computers. Sknake was kind enough to give me the command line switches to get a MSSQL install set up …
i write the procedure for login in this user can give username or emailid for the login. this is my code.... please check is there any change is required for this [code=text] ALTER procedure [dbo].[users_login] (@username varchar(50),@password varchar(50), @emailid varchar(50),@ret int output) as begin select username,password,emailid from users where( username=@username …
hi all, i have a database called DB with a table called Menu_reporting that logs when the user selected through calling the server (See below) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ USE [DB] GO /****** Object: Table [dbo].[Menu_Reporting] Script Date: 01/31/2010 17:07:26 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO SET ANSI_PADDING ON GO …
Hi all, I am using a TQuery to do a select * from a table. I have a PC with a very large database, using SQL express 2008 SP1 10.0.2531.0. Through the SQL management studio interface, I can see that my table has 7 million records. The result of the …
Hello guys. My future site physically locating in: C:\inetpub\wwwroot directory, which is accessible as [url]http://localhost[/url]. IIS 7.0 knows this site as 127.0.0.2. This means, that I created new site in IIS and assigned physical location even the directory of my over-mentioned site. Looks like everything works fine. In SQL Server …
Hi, What all are the ways to synchronize two SQL databases? If there is a way to do it via query or code, what is that query/code? Please help. Thank you.
I have a db that has a description column all descriptions are one paragraph except one needs 2 paragraphs and two hyperlinks. Can I input HTML into the one data row?
We're experiencing very slow connections at our other location which is accessed through a dedicated 1.5mg T1 line with a specific open port through our firewalls. When at corporate we have no speed issues connecting to our ERP system which is run off SQL 2003. However, at our other location …
Dear Developers SQL, Table CODE has data as following Code------product 1-----------Mango 2-----------Potato 3-----------Orange SQL, Table SALE has following data Code------Product 2----------- 3----------- I want to fill sale.product column with code.product columns as Code------Product 2-----------Potato 3-----------Orange What query should I USE? Please help
hi i want to show the message box using database conditions,,,,, here my coding is given below......... [code] Protected Sub roomno_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles roomno.SelectedIndexChanged Dim conn As New SqlConnection(ConfigurationManager.ConnectionStrings("guest1").ConnectionString()) Try conn.Open() Dim dr As System.Data.SqlClient.SqlDataReader Dim da As New SqlClient.SqlCommand("select room_no from guesthouse WHERE …
I am writing some code to retrieve data from SQL Server, including an image field. I load the retrieved image data into a byte array and then convert the array into an image. Finally, I want to show a thumbnail of the image in a picturebox control on my app's …
Hi All i am quite new to mssql db and would like to find someone to help me with some errors i keep getting i have uploaded my new db and when i try to open my website i get the following errors [code] <!-- Web.Config Configuration File --> <configuration> …
I have a database column defined as int that contains a negative number representing a date in mmddyy format (without the leading zero) so -10209 = 01/02/2009 -122508 = 12/25/2008 How can I convert the data to a datetime so I can compare it to another date in a where …
I have followin codes [CODE]Dim dt As DataTable Dim str As New SqlClient.SqlCommand("select code,name from employees", con) da = New SqlClient.SqlDataAdapter(str) dt = New DataTable da.Fill(dt) dt.Columns.Add("city") Dim cmd As New SqlClient.SqlCommand("UPDATE dt SET city=(SELECT top 1 city FROM master WHERE master.code=dt.code)", con) cmd.ExecuteNonQuery() [/CODE] it says [COLOR="Red"]Invalid object name …
Dear Developers SQL, Table1 has data as following Code------product 1-----------Mango 2-----------Potato 3-----------Orange Datagridview has THREE columns as Code----product-------qty I have following codes [CODE]str3 = "SELECT product FROM table where code =" & Val(DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells(0).Value) dt3 = GetTable3(str3) If dt3.Rows.Count > 0 Then DataGridView1.Rows(DataGridView1.CurrentRow.Index).Cells(1).Value = (IIf(IsDBNull(dt3.Rows(0).Item("product")), "", dt3.Rows(0).Item("product"))) Else MsgBox("Code Not Found", …
Hi Guys Could you please provide me with the code that will upload a file using C# and save it in SQL, I have searched through the internet with no luck at all Thanks in Advance
hi this is my code protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SqlConnection con = new SqlConnection(scon); con.Open(); da = new SqlDataAdapter("select Question,Option1,Option2,Option3,Option4 from QuestionData", con); ds = new DataSet(); da.Fill(ds); } } and this is `.aspx` <asp:FormView ID="FormView1" runat="server" DataSourceID="SqlDataSource1" Width="870px" AllowPaging="True" BorderColor="#999999" BorderStyle="Solid" CellPadding="3" ForeColor="Black" …
I have following codes [CODE] str2 = "select sno,name from employees where sno =" & Val(Me.TextBox1.Text) cmd2 = New SqlClient.SqlCommand(str2, con) da2 = New SqlClient.SqlDataAdapter(cmd2) dt2 = New DataTable da2.Fill(dt2)[/CODE] Now dt2 has two columns as sno and name But I want to add a 3rd column city type char(80) …
Hi all, How to get tables and columns from existing sql server backup file without connect to SQL Server? Is it possible to get table names and column names form raw file like *.bak ? I would like to display the Tables & columns names which are there in backup …
Hi guys, In my application users can search for events that fall with in a particular date range, which works fine. The problem I am having is getting records when I ask for the current months events using the query below. select * From Events Where FromDate >='1/1/2010' And ToDate …
Hi everyone, I've created an application that runs queries against a SQL server (via Data Adaptors) in VB.NET 08 and returns the results to a DataGridView. It works great and returns my data, but when I switch to a different query that returns different columns, the DataGridView keeps the old …
Hi All, Im new to the forum so not sure where to post my question, any help would be greatly appreciated. I have written a program in Delphi 2007 using MS SQL connection, My program runs fine on the development system but as soon as I put it on a …
kindly please tell me how to connect from java to ms access, sql,oracle and so etc . with example
Hello Friends… Before going into why I am writing this, first I want to confess one thing. I am not a very experienced professional like some of you reading this post. I am just a beginner in learning Ms-Office. As a sincere amateur, I so far explored most of the …
hi, its very urgent for me, hi , i wants to show the label when status='C' and 'F' (selected from the database) here i want to show the label message as like "rooms 2 (status ='C' ) and 3 (status='F') are free" by using database conditions......... here iam using sqlserver …
Hello guys! Well, my question must be simple and someone will fall in laugh while thinking what kind of morons are exist in the world. :-) Question #1: Ok, I have a HTML table stored in one of the columns in SQL-table (is this approach right, or should I store …
I am trying to update a sequence of records where the field WebSvc = No Here is the code [code] cn.Open() da = New SqlDataAdapter("SELECT * FROM dbo.DurexBOL", cn) cmdBuilder = New SqlCommandBuilder(da) da.Fill(ds, "DurexBOL") Do While ds.Tables("DurexBOL").Select("WebSvc = 'No'") ds.Tables("DurexBOL").Rows(0)("WebSvc") = "Yes" da.Update(ds, "DurexBOL") Loop Console.WriteLine("City updated successfully") cn.Close() …
The End.