9,022 Topics

Member Avatar for
Member Avatar for virusisfound

I want to pass multiple select queary to datareader. how to do it. I know how to pass queary for one condition : [CODE] SqlConnection cn = new SqlConnection(); cn.ConnectionString = ""; cn.Open(); SqlCommand cmd = new SqlCommand(); SqlDataReader rdr; string s = "select * from abc where id like@find"; …

Member Avatar for virusisfound
0
217
Member Avatar for MARKAND911

I have a query in stored in a variable @query I execute that query using following statement [COLOR="Green"]execute[/COLOR](@query) I want the number of rows returned by executing above statement in sql server How can i get that?

Member Avatar for BitBlt
0
69
Member Avatar for paresh_thummar

I use two reader rdr1,rdr2 after usage of first reader i close that by rdr1.close(); then I used second reader but i found run time error which is illustrate below [COLOR="Red"]There is already an open DataReader associated with this Command which must be closed first. [/COLOR] [CODE] SqlDataReader rdr1 = …

Member Avatar for Member #905211
0
129
Member Avatar for crazycat503

Is there anyway to do it? I find a msoft tool that does it for sql server 2005. There is an import feature in sql server 2008 but it doesn't do it correctly. Anyway to convert my database with all its relationships to sql server automatically??

Member Avatar for BitBlt
0
222
Member Avatar for avocado_juice

Hi, Does anyone know on how to convert vb.net to excel. I am new in this company and they are using Microsoft SQL Server Management Studio for their database. FYI, they are using stored procedure as well. Thank you

Member Avatar for avocado_juice
0
832
Member Avatar for virusisfound

I am working in sql server2005 and c# I have five database in my project and I want to display one table from each database in one datagridview. How can i do it.

Member Avatar for virusisfound
0
176
Member Avatar for sainigks

Hi everyone, i have created a sql table to store hindi data. it works fine. Now i want to store data in this sql table from an Excel sheet. i want to know which hindi font i have to use in excel sheet so it will store hindi data in …

Member Avatar for urtrivedi
0
779
Member Avatar for arshi9464

i am working on a java project, one of its web pages includes this query:- [code] select pname,age,gender,dscrptn from patient where curdate='05-17-2011' and docref='arshdeep' and meet='no' [/code] but it is not working, i executed this in MS SQL, BUT ITS SHOWING ONLY THE COLUMN NAMES THERE. i.e pname age gender …

Member Avatar for BitBlt
0
92
Member Avatar for towerrounder

Hi all, I'd appreciate some advice concerning the following issue. I have a situation with two very different ways to implement. Both are easy, but Im not sure of the pros and cons of each. Basically I am allowing users to message each other on a website, and so I …

Member Avatar for nick.crane
0
233
Member Avatar for Acrotab

Hi, Changes made in TextBox is not saved and, consequently, no changes occur in the data base These characteristics are set in the TextBoxes: OnTextChanged="NamеTextChanget" AutoPostBack="true". What do I need to change in the code? This is the code: [CODE] private string resultBase = "Произошло изменение"; string str; string save_str; …

Member Avatar for Acrotab
0
150
Member Avatar for denmarkstan

please people i need your help here. I am learning how to develop a hospital diagnostic software. problem is how to match user input sentence with what i have in the database, talking about symptoms matching. plaese help me to achieve this. here is my code: [ICODE]protected void Button1_Click(object sender, …

Member Avatar for Pgmer
0
204
Member Avatar for siaswar

hi I am new to SSRS. I have a matrix table like below: [CODE]--------------------------------------------------------------------------- | id | name | family | book1 | book2 | book3 | book4 | book5|...|book10| [/CODE] As you know, the count of books in rum time are different for each user. it's may be 10 …

0
68
Member Avatar for VIeditorlover

I have a problem with this construction, can not find how to rewrite it properly. [CODE] private SqlParameter op <T> (T? t, string name) { SqlParameter sp = new SqlParameter(); sp.IsNullable = true; sp.ParameterName = name; sp.Value = t.HasValue ? t.Value : Convert.DBNull; return sp; } [/CODE]

Member Avatar for gusano79
0
230
Member Avatar for moone009

How simple is it for an iphone app to connect to a ms database? Also, could somone please provide an example of a select and update statement plus connection string?

Member Avatar for peter_budo
0
51
Member Avatar for jacksantho

Hi, I don't have any idea on this error: [B][CODE] Object of class variant could not be converted to string.[/CODE][/B] I am facing the error in this block.Please have a look on this: [B][CODE]IF($g!="P") { mssql_close($dbhandle); //*** Close & Quit ***// $excel_app->Application->Quit(); $excel_app = null; $Workbook = null; $Worksheet = …

Member Avatar for twiss
0
378
Member Avatar for garrypeace

Here is the ListView I have for the products page: [CODE] <asp:ListView ID="list_view" runat="server" DataSourceID="SqlDataSource1"> <ItemTemplate> <table class="single_product"> <tr> <td> <img src="<%# Eval("image") %>" /> </td> <td> <asp:Label ID="nameLabel" runat="server" Text='<%# Eval("name") %>' /> </td> <td> <asp:Label ID="descriptionLabel" runat="server" Text='<%# Eval("description") %>' /> </td> <td> <form action="comments.aspx" method="post"> <input type="hidden" …

Member Avatar for matthewskyle
0
132
Member Avatar for niths

hi all, i had a problem with displaying the data in textbox. My code is here [CODE] string note = "SELECT Notes,NDate FROM Ticket_Notes WHERE TicketNo ='" + tktno.Text + "' "; SqlCommand cmd3 = new SqlCommand(note, con); SqlDataReader id = cmd3.ExecuteReader(); while (id.Read()) { dnotes = id.GetValue(0).ToString(); ndate = …

Member Avatar for CsharpChico
0
205
Member Avatar for deadelgabar

[CODE]Private Sub Command4_Click() Dim vPass As String If IsNull([usernametxt]) = True Then MsgBox "Username is required", vbOKOnly, "Required Data" ElseIf IsNull([answertxt]) = True Then MsgBox "Password is required", vbOKOnly, "Required Data" End If ' Evaluate filter before it is passed to DLookup function. strFilter = "[USERNAME]= '" & Me.usernametxt & …

Member Avatar for BitBlt
-1
226
Member Avatar for ryan311

[CODE]cmd.ActiveConnection = cn cmd.CommandType = ADODB.CommandTypeEnum.adCmdStoredProc cmd.CommandText = "sp_login" cmd.Parameters.Append( _ cmd.CreateParameter("result", ADODB.DataTypeEnum.adInteger, ADODB.ParameterDirectionEnum.adParamOutput)) cmd.Parameters.Append( _ cmd.CreateParameter("user", ADODB.DataTypeEnum.adVarChar, ADODB.ParameterDirectionEnum.adParamInput, 15, TextBox1.Text)) cmd.Parameters.Append( _ cmd.CreateParameter("passuser", ADODB.DataTypeEnum.adVarChar, ADODB.ParameterDirectionEnum.adParamInput, 15, TextBox2.Text)) rs.Open(cmd, , ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic) If rs.Fields!result.Value = 1 Then AddProduct.Show() Else MsgBox("Your Username or Password is Incorrect", MsgBoxStyle.Information, "AEB Gasul System") Exit …

Member Avatar for Pgmer
0
284
Member Avatar for DONPAWPAW

when connecting to sql server i get getting this error . please help how to resolve this problem TITLE: Connect to Server ------------------------------ Cannot connect to SOFTCITY\EIMPRESSION. ------------------------------ ADDITIONAL INFORMATION: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may …

Member Avatar for DONPAWPAW
0
105
Member Avatar for Xaelian

I'm making a PHP script for controlling my mssql databases. But I ran into a couple of problems. The first problem is that I want to make a combobox out of all the databases in my microsoft SQL server. The following SQL syntax gives the results that I'm looking for, …

Member Avatar for Xaelian
0
102
Member Avatar for virusisfound

I have table abc In taht I want to add colunm at run time. I have done some code but there is an error [CODE]SqlConnection cn = new SqlConnection() ; cn.ConnectionString = ""; cn.Open(); SqlCommand cmd = new SqlCommand("alter table abc add" + textBox1.Text.ToString() + "varchar(500)",cn); cmd.ExecuteNonQuery(); SqlCommand cm = …

Member Avatar for virusisfound
0
231
Member Avatar for zack_falcon

I've written a sales and inventory program in C# that makes use of SQL Server, because I've heard it functions well over LAN connections (haven't tried it yet). I've... let's say... hardwired the my connection string into the program. I have a notepad connection.ini file that has the connection string, …

Member Avatar for Mitja Bonca
0
240
Member Avatar for david59

please see this picture: [URL="http://www.irupload.ir/images/t03rzv61q36tmhnvic4.jpg"]http://www.irupload.ir/images/t03rzv61q36tmhnvic4.jpg[/URL] in this query instructor table is for register information teachers. how i can this query to statement in sql? thanks.

0
76
Member Avatar for abelLazm

Hey all... I have assigned a job to create back of the databases of our company, maintain it for 7 days and after 7 days delete the back... I have worked on this and make it up the following query but still confused on its authenticity. Please Check and tell …

Member Avatar for abelLazm
0
167
Member Avatar for virendra_sharma

Hi , i am getting syntax error in INSERT INTO statement. getting this error on cmdobj.ExecuteNonQuery(); [CODE]string connectionstring = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=D:\website\AddContact.xlsx; Extended Properties=""Excel 8.0;HDR=Yes"";"; OleDbConnection conobj = new OleDbConnection(connectionstring); string Query = "INSERT INTO [Sheet1$](Fname, LName,PhoneNo,Email-ID) values (" + TextBox4.Text + ",'" + TextBox1.Text + "','" + TextBox2.Text + …

Member Avatar for shakeb@techwave
0
297
Member Avatar for deadelgabar

[CODE]Public Sub loginbtn_Click() If IsNull([usernamecbo]) = True Then MsgBox "Username is required", vbOKOnly, "Required Data" ElseIf IsNull([passwordtxt]) = True Then MsgBox "Password is required", vbOKOnly, "Required Data" Else If Me.passwordtxt.Value = DLookup("PASSWORD", "SYS_USER", "[SERIAL_NUMBER] = " & Me.usernamecbo.Value) Then strUser = Me.usernamecbo.Value strAccountType = DLookup("USER_TYPE", "SYS_USER", "[SERIAL_NUMBER] = " & …

Member Avatar for Ezzaral
0
164
Member Avatar for wova

Is using php with MS SQL server over MySQL a good practise? Ive been using MySQL for quite sometime and what I like about it is that it is free. Are there any advantages of using MS SQL server over MySQL? Or any challenges.

Member Avatar for codewall
0
82
Member Avatar for shuhana84

HI,anyone know how to check every single record that we have been inserted in sql server?either exist or not..please help.

Member Avatar for Pgmer
0
172
Member Avatar for zachattack05

I noticed in the Advanced Properties of the connection string dialog, there is a setting for AttachDbFilename (see picture attached). The question is, in this case, the file resides on the E:\ drive of my local system. When the application is finished and deployed, will my application's connection string still …

0
49
Member Avatar for zachattack05

I think I understand the general concept of how these files work, but I want to make sure, and ask a couple questions about them. Am I correct in thinking MDF files are "attached" to the SQL instance only as long as the application is running and are "detached" when …

0
72
Member Avatar for YMCMb

Hello everyone My current scenario is creating a mark sheet for students on different module. Module 1 marks are as follows Grade A = 70 marks or over Grade B = 55-69 Grade C = 40 -54 Grade F = 0-39 Module 2 marks are as follows Grade A = …

0
80
Member Avatar for solomon_13000

I managed to duplicate a single record. However I intended to display the duplicate record with different values. For example: A ABC 065 001 A10111 Sell 54.847500 0 0 T ABC 065 001 A10111 Sell 50.847500 0 1 [CODE] SELECT case i.ordStatus when 'Queued' then 'N' when 'Filled' then 'A' …

0
146
Member Avatar for mikkime23

[LEFT]Hey guys. i am trying to insert data from a form to a sql database, but this error keeps coming up. [code]Incorrect syntax near ',' [/code] Here is the code. [code] Dim AddSwimmer_comm As New SqlCommand( _ "INSERT INTO [MasterRecords] ([APASCID], [FullName], [Gender], [DOB], [21m], [25m], [50m], [100m], [4x21m], [4x50m]) …

Member Avatar for Joeromine
0
198
Member Avatar for jooorj

Hi everybody I am Joorj I need to ask about a fine dll or code or components to receive emails for multi users, because I work for a company that need a software to receive all emails for their employees and save them back into SQL Database. without using manual …

Member Avatar for jooorj
0
228
Member Avatar for missc

hi, can i use count and top 6 in the same sql command ?? and also, how can i use inner joins to link guest id in reservation table with guest name from guest table

Member Avatar for missc
0
141
Member Avatar for kirtee2209

Hi. I am doing a C# windows form application and I am using Ms Access for the database. I have a sql query which retrieves data from 2 tables and I am displaying it in a crystal report. The problem I am having is for example i have 4 records …

Member Avatar for BitBlt
0
189
Member Avatar for arshi9464

i am working on a project in which, i have a text area and when the user enters some details in that text area, the data should be saved in a text file and the path should be saved in the database, when another user wants to access that text …

Member Avatar for javaAddict
0
151
Member Avatar for mshauny

Hi I'm not an asp .net developer although I have done web development with php and mysql, I'm more of a software developer for desktop and mobile devices. So this is my first big project with ASP .NET. I have a question with the ASPNETDB database, understand that the database …

Member Avatar for crishlay
0
200
Member Avatar for Sarama2030

i have just downloaded sql server 2008 from the microsoft download center. when i try to install it at extraction it says its not a valid win 32 apllication. what could be the problem?

Member Avatar for watsonmichell
0
148
Member Avatar for Member #904222

Trying to import a flat file into SQL Server using SSIS. The file format is like this: [CODE] Image: C:\folder1\1234\5678.jpg ColHead1 ColHead2 ColHead3 Data1 Data2 Data3 [/CODE] I need a result that looks like this: [CODE] ColHead1|ColHead2|ColHead3|ColHead4 ----------------------------------- 5678 |Data1 |Data2 |Data3 [/CODE] So the idea is that we extract …

Member Avatar for Member #904222
0
651
Member Avatar for Bline

I am an retired untrained volunteer who assist a couple nonprofits with their web sites. I could really use some help on a problem I have been attempting to resolve. I am developing an application for one of the sites that generates assignment cards for Football Game Officials from information …

Member Avatar for Bline
0
120
Member Avatar for PPS

I have a class registration form. The database has a semester table, class table, student table and registration table. I want a query to return a list of students that are registered for a class in an active semester. I have the query, but it returns each student twice. I …

Member Avatar for PPS
0
212
Member Avatar for kirtee2209

Hi. I am doing a C# windows form application and I am retrieving data from a database and saving in a datatable temporarily. I have to access each cell and update them. [CODE] try { string TaskStatus = "Assigned"; SqlCommand cmd1 = new SqlCommand("SELECT Day_Date FROM tblDaily_Task_Schedule WHERE Task_Status='" + …

Member Avatar for kirtee2209
0
160
Member Avatar for kitjo

i have my interface built already and my sql database. i want to connect the interface to the database. i have four fields that is the lugword, meaning1, meaning2 and the search from the database can some ome help me

Member Avatar for anth0ny989
0
124
Member Avatar for xanawa

I am using SQL Server 2005 and Visual Studio 2008. I would like to add a report using an existing dataset. I want to group by Reservation Month BUT the field is dateTime. How can i only display reservvations per month?

Member Avatar for virusisfound
0
113
Member Avatar for virusisfound

Hello, I want to save multiple record in database from DataGridView. I have some code but their is an error i.e [B] Column named id cannot be found. Paramater name:columnName[/B] [CODE]SqlConnection cn = new SqlConnection(); cn.ConnectionString = "path of connection"; cn.Open(); string q = "select * from abc"; SqlDataAdapter da …

Member Avatar for virusisfound
0
479
Member Avatar for ceyesuma

Hello all. The Java Date and time classes are difficult. I think I have to use java.sql.Date which is a sub class of Date but is not a date unless the time is normalized to zero. so I've heard. I would like to work with my studentDOB first by collecting …

0
79
Member Avatar for Mystery_Planet

Hi! I have a DataBase and a query (SQL on C#). My table is about airways. So program should find one or some flights with searching them by FLIGHT NUMBER. I have DataGridView with this table. So what should I do with query and DB to get a table (DataGridView) …

Member Avatar for Momerath
-1
130
Member Avatar for vanpersie

Hi guys I have a database involving the following table [B]Inventory Table[/B]Item_code int primary key, Item_name varchar(50), Item_cost money, Imported_quantity numeric(18,0), Item_Quantity numeric (18,0)' [B]Sale Table:-[/B] item_code int foreign key references Inventory(item_code) , withdrawal_id foreign key References Withdrawal_Operations(withdrawal_id) ,quantity_Available_for_Sale numeric(18,0), quantity_withdrawan numeric(18,0), selling_price money, quantity_sold numeric(18,0), Sale_Operation_Date datetime , Item_cost …

0
92

The End.