9,022 Topics

Member Avatar for
Member Avatar for atticusr5

hello all, I have a question about assigning variables values based on values stored inside an sql database. I have the connection part down, but here is my basic set-up. I have a table with the values {username, password, isAdmin}, where username and password are strings and "isAdmin" is a …

Member Avatar for Reverend Jim
0
171
Member Avatar for cyberdaemon

Good day, I want to delete a record from a single table but some of the filed on sigle record is related to other table on my database. how would i delete it.. i used this script delete from faculty deptid = (select deptCode from dept) all i want is …

Member Avatar for cyberdaemon
0
145
Member Avatar for sharon.chapman7

Hi, I have a windows form with a "ComboBox" on it. The "ComboBox" has the words "Production" and "Development" in it. If the user selects "Production", I need my C# code to point to the Production database. If the user selects "Development", I need my C# code to point to …

Member Avatar for Cameronsmith63
0
376
Member Avatar for M.Waqas Aslam

hello ! i am working on an application and i want to connect it with mssql database , i dont know about the version of installed mssql server at the pc , how can i get the version of installed mssql server so that i can connect my application with …

Member Avatar for cguan_77
0
193
Member Avatar for vivekanandaan

[CODE] Dim conn As New OleDb.OleDbConnection Dim dbprovider As String Dim dbsource As String Dim ds As New DataSet Dim da As New OleDb.OleDbDataAdapter Dim sql As String Dim maxrows As Integer dbprovider = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" dbsource = "Data Source = d:\sprrg\scm\scm\sprrg.mdb" conn.ConnectionString = dbprovider & dbsource conn.Open() sql = "select …

Member Avatar for malkit.672
0
207
Member Avatar for smeboyds

I have a database that continually receives information from outside sources. I then use SQL code to take this data and move to different databases based on the information received. As it stands right now, if I receive a '1', '2', '3', from an outside source, we manually move it. …

Member Avatar for Cruize_Invades
0
124
Member Avatar for princenathan

Private Sub autocus() Call main() Con.Open() Dim cmd As New SqlCommand("SELECT cust_order FROM Inventory", Con) Dim ds As New DataSet Dim da As New SqlDataAdapter(cmd) da.Fill(ds, "My List") 'list can be any name u want Dim col As New AutoCompleteStringCollection Dim i As Integer For i = 0 To ds.Tables(0).Rows.Count …

Member Avatar for Reverend Jim
-1
1K
Member Avatar for M.Waqas Aslam

hello ! i have experience in VB.net,C# and MSSQL2000,2005,2008r2 .but today my boss assign me a task to connect mssql server 2008 by using JS or JSON ,both are unknown for me ,:( i dont have any knowledge about JSON and JS , can any one help me how to …

Member Avatar for darkagn
0
258
Member Avatar for jovillanuev

[CODE]IF OBJECT_ID('tempdb..#Table', 'U') IS NOT NULL DROP TABLE #Table GO Create Table #Table ( CorrectionDate datetime, Origdesc nvarchar(50), Newdesc nvarchar(50), Total int ) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','NTF',193) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','NTF','RMAWAR',108) Insert Into #Table (CorrectionDate, Origdesc,Newdesc,Total) Values ('2011-08-01 00:00:00.000','RMAWAR','Sub Abuse',86) Insert Into …

Member Avatar for adam_k
0
99
Member Avatar for Rock_IT

im a beginner wid vb .net and need to clear the air wid connecting a database file created on sql server 2008r2 wid vb.net 2008 for a project..plz nebody help from scratch regardng retriving,insertng n modifyng data using vb.net code..awaiting....

Member Avatar for princenathan
0
236
Member Avatar for skran

Hi all! I m trying to filter a datagridview (connected to sql server). I have used if statements in order to take all the possible combination but now I have 8 textboxes into which the user should insert values and filter the datagridview.. it is too complex.. I have asked …

Member Avatar for M.Waqas Aslam
0
434
Member Avatar for skran

Hi all I m trying to filter a sql db with many filter criteria which inert the user in textboxes .. i ve tryed this query [CODE]query = "Select * from T_INCIDENTS1 where IFF (txtPostcode.text is notNull) then Incident_Postcode='" & txtPostcode.Text & "') and iff (txtDMA.text is notNull) then Incident_DMA='" …

Member Avatar for skran
0
250
Member Avatar for jacob21

hello experts I have one problem that when i create a store procedure with two sqlquerysuch as(1,2 query) and after some days (2 days),i create 3rd query on that same produre name.then my 3rd query not work on aspx page.But when i make another procedure with same 3rd query it …

Member Avatar for mani-hellboy
0
192
Member Avatar for M.Waqas Aslam

hello ! my boss assign me a task to connect mssql server 2008 and show records in table using JS and JSON , i m very new in asp.net , can any one me help me where to start my work and how i can complete this , can any …

Member Avatar for mani-hellboy
0
194
Member Avatar for aldm

Hi, I work on one project in ASP.NET MVC3. Everything worked fine, until I created new table Price_Ranges. I then tried to get data using LINQ, the following code: [CODE] IEnumerable<PriceRange> priceRanges = from pr in dbContext.PriceRanges join cat in dbContext.Categories on pr.Category_Id equals cat.Id where cat.Id==categoryId select pr; [/CODE] …

Member Avatar for aldm
0
253
Member Avatar for M.Waqas Aslam

hello ! i am working on an application and i want to connect it with mssql database , i dont know about the version of installed mssql server at the pc , how can i get the version of installed mssql server so that i can connect my application with …

Member Avatar for cyberdaemon
0
314
Member Avatar for jugnu

Hello Everyone! I have SQL Server 2008 R2 Developer Edition at my work place and at home I have SQL Server 2008 Personal Edition. When I copy Developer Edition Database to Personal Edition Database it gives error. Is there any way to copy a database from Developer Edition to Personal …

0
96
Member Avatar for ForceStr

Hello, can anyone explain me why I'm still one step behind with this code? [CODE]private void jTextField1KeyPressed(java.awt.event.KeyEvent evt) { try { DefaultTableModel model=(DefaultTableModel)jTable1.getModel(); model.setNumRows(0); String Name=jTextField1.getText(); String sql= "SELECT * FROM APP.Workers WHERE First_Name LIKE'" +Name+ "%'"; rs= stmt.executeQuery(sql); while (rs.next()) { String d1=(rs.getString("First_Name")); String d2=(rs.getString("Last_Name")); String d3=(rs.getString("Job_Title")); String d4=(Integer.toString(rs.getInt("ID"))); …

Member Avatar for ForceStr
0
196
Member Avatar for bhagawatshinde

Hi Guys, Can you have any idea about randomly shuffle the questions in database without affecting questions id. Let i will explain little bit more ...... read carefully 1) I have a table containing 5 questions like this que_id que 1 abc 2 bcd 3 efg 4 hij 5 klm …

Member Avatar for bhagawatshinde
0
118
Member Avatar for jovillanuev

Hi Forumer's Kindly give me some Benefits to the company for taking SSAS training. I need 3 more...Thanks... JOV

0
90
Member Avatar for UndoRejected

hi all I need help plzzzzzzzzzzzzzzzz my project uses asp.net and sql database I use treeview to insert and retrieve hierarchical data from the database I used the following code the problem is when I added the code for the retrieval the insertion has a problem where I can't add …

0
195
Member Avatar for sw8revenge

need some help here what i want is when the user inputs the username and password, his/her information will be showed in the textbox located at the mainform which shows the users information like where he live and his occupation. please help me on how to show users data in …

Member Avatar for Reverend Jim
0
93
Member Avatar for goltu

Please help me i do not want to show successfully message in again insertation in page. [CODE] protected void Button1_Click(object sender, EventArgs e) { try { string constr; constr = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString; SqlConnection con = new SqlConnection(constr); con.Open(); string str = "insert into Doe_detail values('" + TextBox1.Text + "','" + TextBox2.Text …

Member Avatar for sufyan2011
0
94
Member Avatar for Mike_

I am attempting to create a global temp table to be used between two sessions being called from a webservice. When I attempt to access the temp table from the second session it can not be found. The reason I am using a global temp table is because the initial …

Member Avatar for thines01
0
199
Member Avatar for shibuvarghese

I created on Employee master form. The details which i enter in this form is saving to sql table. But if i use Wild characters example in Name field if i enter "Varghese D'Costa", then the following error comes : Line 1: Incorrect syntax near 'Costa' Unclosed quotation mark before …

Member Avatar for Reverend Jim
0
2K
Member Avatar for kolibrizas

So I am trying to make let's say, a chat software. For this example there will be two users X and Y and the Database named DB: 1. Both X and Y are connected to DB 2. X sends a message through a form by clicking submit, 3. the message …

Member Avatar for kolibrizas
0
337
Member Avatar for deucalion0

Hey guys, so I have been trying to get images to appear with an SQL query using PHP. My table has a column called picture, it is datatype nvarchar50. I have a folder in my project called images and in there an image called 4.png. So in the field of …

Member Avatar for Member #120589
0
1K
Member Avatar for deepak690

Friends i want to submit project in my college on employee management system.... front end should be c# and back end sql server 2008... i got one project on net but its backend is microsoft access I want to change this to sql server 2008.... what changes i have to …

Member Avatar for thines01
0
186
Member Avatar for uva1102

Good Everyone. I have added 2 more column for supervisor and manager for verified.Once engineer done the work he will select done from dropdown column.supervisor verified engineer's "done" work. ALTER TABLE [dbo].[Record] ADD CONSTRAINT [verify] DEFAULT ((0)) FOR [VerifiedbySupervisor] ALTER TABLE [dbo].[Record] ADD CONSTRAINT [mgr] DEFAULT ((0)) FOR [VerifiedbyManager] GO …

Member Avatar for thines01
0
150
Member Avatar for SANJAY26

Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Call ImageRetrieve() End Sub Private Sub ImageRetrieve() imgsave2.Update() Dim OleDbConnection1 As New System.Data.OleDb.OleDbConnection("PROVIDER=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE=D:\Testing\DATABASE\TESTING.MDB;PERSIST SECURITY INFO=FALSE;") OleDbConnection1.Open() Dim OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand = New System.Data.OleDb.OleDbCommand() Dim OleDbReader1 As System.Data.OleDb.OleDbDataReader 'Access (OleDb) OleDbSelectCommand1.CommandText = "Select h1_img,h2_img,h3_img,h1_sign,h2_sign,h3_sign from vLOCKER WHERE lockerno …

Member Avatar for SANJAY26
0
165
Member Avatar for ahmed elweshahy

i wanna make setup file to my app C# Database app with SQL SERVER 2008 R2 i wanna specific steps 1 - 2 - 3 and what about database file (.mdf), how can i handle this and i wanna when i take this setup file to any another pc once …

Member Avatar for skatamatic
-2
161
Member Avatar for mastanasp

[CODE]public Int32 SQL_GetMaxValue(string TableName, string FieldName) { return SQL_GetMaxValue(TableName, FieldName, ""); } public Int32 SQL_GetMaxValue(string TableName, string FieldName, string WhereCondition) { try { string SQLString = "SELECT MAX(" + FieldName + ") FROM " + TableName; if (WhereCondition != "") { SQLString += " WHERE " + WhereCondition; } objCN.Close(); …

Member Avatar for mani-hellboy
-1
98
Member Avatar for weblion

stored procedure ALTER PROCEDURE [dbo].[arun] AS BEGIN select 'live the code' END using the sqldatareader string firstName=""; string connectionString = @"Server=AKBT-TM;Database=masterregister;User ID=sa;Password=turner;"; using (SqlConnection conn = new SqlConnection(connectionString)) { using (SqlCommand cmd = new SqlCommand("dbo.arun")) { cmd.CommandType = CommandType.StoredProcedure; //cmd.Parameters.Add(new SqlParameter("@LastName", "Alexander")); conn.Open(); cmd.Connection = conn; using (SqlDataReader rdr = …

-2
56
Member Avatar for applebule5

I am trying to set up a database with Students, Courses and grades. This is the main bulk of my code, I am stuck with the error below, could anybody help me? [CODE] Imports System.Data.OleDb Imports ADODB Public Class Form_Main Dim cn As OleDbConnection Dim StudentUpdateCommand As New OleDbCommand Dim …

Member Avatar for hericles
0
184
Member Avatar for zachattack05

So, the question is, if I have a table on a SQL server with 20 columns, and I need to retrieve just 4 columns for a form, and I am using stored procedures to do most of my queries, should I create a stored procedure to retrieve just the 4 …

Member Avatar for zachattack05
0
172
Member Avatar for edfinley

I have a form with a recordset which is filtered on some controls on the form. In the code behind page I want to loop through the records as filtered on the form. I can set up another SqlDataSource and refilter it on the same controls, but I'm wondering if …

Member Avatar for mani-hellboy
0
83
Member Avatar for preeti anand
Member Avatar for rch1231
0
74
Member Avatar for arunpgs

Hi! I want to execute the sql query based on the question. For Example, In Textbox If i enter the question like "What are the department in allahabaduniversity" means following query will be executed "select department from allahabaduniversity;" , Here department is a filed and allahabaduniversity is table, Please Help …

Member Avatar for kamilacbe
0
146
Member Avatar for Bheeman89

Hello Friends. Im having a problem in identifying the Provider for my MSSQL Server 2008. Can anyone address me the location of this information because I have to initialize it in my VB.et. As I understand for Ms Access it is something like [CODE]"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="[/CODE] Can I know where to …

Member Avatar for Jx_Man
0
304
Member Avatar for hatrickwah

I'll try to keep this short, and to the point. I've set up a Windows Home Server 2011, running MS SQL Server 2008R2 Express. I enabled TCP/IP protocol on 1433 static, and named pipes (no changes to named pipes). Remote connections work no problem via remote SQL Server Management Studio. …

Member Avatar for hatrickwah
0
145
Member Avatar for bilal_fazlani

Okay, So I have an application which uses MSSQL server as datasource. Is there anyways I can avoid using any database server and use a local file as datasource ? If yes , what are options. AND HOW ? PS: this is very important guys. please help. THANK YOU.

Member Avatar for bilal_fazlani
0
204
Member Avatar for vivekanandaan

[CODE] Dim connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=""d:\sprrg\\scm\scm\sprrg.mdb"";") Dim adapter As New OleDbDataAdapter("SELECT * FROM mr_head", connection) Dim dbInsert As New OleDb.OleDbCommand Dim table As New DataTable adapter.Fill(table) 'job_code,mr_no,mr_date,item_code,qty,mr_status,mr_approved_date 'Dim row As DataRow = table.Rows(0) connection.Open() dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "job_code" dbInsert.Parameters.Item("job_code").Value = jobcode dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "mr_no" dbInsert.Parameters.Item("mr_no").Value = mr_no dbInsert.Parameters.Add(dbInsert.CreateParameter).ParameterName = "mr_date" …

Member Avatar for vivekanandaan
0
1K
Member Avatar for M.Waqas Aslam

hello EveryOne! i am very new in JS and JSON , or you can say this is my first day to learn something about JS and JSON, i have few questions 1- what is difference between JS and JSON. 2-My Task is to connect MSSQL server 2008 and show records …

Member Avatar for M.Waqas Aslam
0
154
Member Avatar for krishnisilva

hi, I am using SQL client as the database and VS 2008 standard to bild my project. i need to browse for a file and upload it to the SQL database. how can I do this ?? I have the code to browse for the file and insert to the …

Member Avatar for LP...
0
2K
Member Avatar for srinidelite

HI I would Like to Know how can Display the error Message When Executing the SP .. and the Stored Procedure doesn't having any value to Fire the Event .. [CODE] set ANSI_NULLS ON set QUOTED_IDENTIFIER ON go -- ============================================= -- Author: <sabari,,Name> -- Create date: <Create Date,,> -- Description: …

Member Avatar for ckchaudhary
0
586
Member Avatar for Axladrian

I got the following error in my code today: Syntax error in INSERT INTO statement. [code=c]OleDbCommand cmd = new OleDbCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText="Insert into Cursanti([ID],[Nume],[Prenume],[Sex],[Varsta],[Ziua-1],[Ziua-2],[Ora-1],[Ora2],[E-mail],[Telefon],[Referal],[Partic/Grup],[Adult/Copil)] Values ('"+id_b.Text+"','"+name_t.Text+"','"+surname_t.Text+"','"+sex+"',"+age_t.Text+"','"+ziua1.Text+"','"+ziua2.Text+"','"+ora1.Text+"','"+ora2.Text+"','"+email_b.Text+"','"+phone_b.Text+"','"+from_t.Text+"','"+ore+"','"+categorie+"')"; cmd.Connection = con; con.Open(); cmd.ExecuteNonQuery(); con.Close();[/code] The error points at "cmd.ExecuteNonQuery();" Searched the other topics, saw that people had similar problems, but …

Member Avatar for Axladrian
0
116
Member Avatar for jcarbillon

My table has these info T123 T153 T174 Basic SQL count works fine which results to (3).. but when I use this function needed for my query the output is 4. [CODE] COUNT(DISTINCT CASE WHEN id LIKE '%T%' THEN RIGHT(ID, 3) ELSE 0 END) AS Count [/CODE] what's wrong with …

Member Avatar for BitBlt
0
176
Member Avatar for andywyndom

I am wondering if anyone wants to try and better this code sample. Here is the request: Given a range of dates (start, end) return all rows that cross that range where the rows contain a start and end date. This appears to work. I just wonder if anyone else …

Member Avatar for andywyndom
0
224
Member Avatar for Member #870135

..hi...im working with a Cash Collection System using PHP and a Yii Framework.. ...but i am wondering if it is possible to connect a MSSQL Database by Yii... ..if so...then could you please help me how...

Member Avatar for pritaeas
0
114
Member Avatar for skran

Hi all! I try to filter a datagridview and I wrote an sql statement for that reason. The problem is that although I achieved to have multifilter I can find how to make my cod ignore the criteria which are null (empty criteria, when the user doesn t give any …

Member Avatar for skran
0
281

The End.