2,569 Topics

Member Avatar for
Member Avatar for saat.kerkuklu

Hello guys i have a question i have these codes Imports System.Data Imports System.Data.SqlClient Module Connect Public Conn As SqlConnection Public Function GetConnect() Conn = New SqlConnection("Server = SQL Server;" & "initial Catalog = BloodBank;" & " Trusted_Connection=yes") Return Conn End Function End Module Public Class BloodDonor Private Sub TextBox5_TextChanged(ByVal …

Member Avatar for saat.kerkuklu
0
969
Member Avatar for mayuri.koul

**have used the following code for displaying names of my sql db tables in combobox...now i want dat when i click on any of these table names from combo box..my dgv populates with that table's contents...i have gor three tables in my db..lol,datejoin and tble ** private void Form1_Load(object sender, …

Member Avatar for TnTinMN
0
1K
Member Avatar for korathualex
Member Avatar for pritaeas
0
84
Member Avatar for korathualex

How to Get Difference between frommonth with fromyear compared to tomonth with toyear.... For instance one has work experience with frommonth March and fromyear 2006 and tomonth June and fromyear 2007 duration should be 1 year and 3 months...Also there would be multiple work experience with various durations as mentioned... …

Member Avatar for cxzei
0
142
Member Avatar for engrmshahzad

SELECT * FROM `users` WHERE `birth_date` between '%-02-02' AND '%-05-06'

Member Avatar for JorgeM
0
82
Member Avatar for joseph.lyons.754

Hey guys im populating a combo box from my database i was just wondering how do i prevent the combo box from displaying different instances of the same value. e.g three B&Bs all from ennis. ennis is in the combobox but its displayed three times. how do i stop this …

Member Avatar for Szabi Zsoldos
0
149
Member Avatar for while(!success)

Hi guys, I'm hoping you can help me find a more elegant solution to my query inside a foreach loop. Here is the loop in question: foreach (DataRow row in dt_blah.Rows) { SqlCommand sc = con.CreateCommand(); sc.CommandType = CommandType.Text; sc.CommandText = "select blah blah blah .. where S = @s1 …

Member Avatar for AleMonteiro
0
1K
Member Avatar for AmrMohammed

Greetings, I want to know what is the best practices when setting new database options? which options I should switch them from False to True and vice versa

Member Avatar for pritaeas
0
211
Member Avatar for officallysabbir

I have the following code which is in a class called customerModel. How do I call this method to another method inside another class called customerController? I am abit new to this and have been trying for ages but have had no luck. Please help thank you. public class customerModel{ …

Member Avatar for JamesCherrill
0
479
Member Avatar for deepak.fugo

Hi All, I have 5 product tables(product_table_1,product_table_2 and so on), category table and sub category table I need to get number of products mapped for each category. i.e count of products accross categories. Below are the table structure and the query which i have written, I need to optimize the …

Member Avatar for AleMonteiro
0
188
Member Avatar for manhthaodn

My database with the following table: ITDetail Table: [Click Here](http://i.imgur.com/WcwRI.jpg) InvTrans Table: [Click Here](http://i.imgur.com/hPnlz.jpg) Currency Table: [Click Here](http://i.imgur.com/YUNxC.jpg) Database Relationship: [Click Here](http://i.imgur.com/CTCdo.jpg) I need to build a report with the time parameter (use the procedure; [Click Here](http://i.imgur.com/PwVYX.jpg)) with the following requirements: 1. MaterialID, Art, Color, Width is taken from the …

Member Avatar for LastMitch
0
175
Member Avatar for ikrami.hall

UPDATE members a INNER JOIN members b on a.Recommended_By = b.ID set a.Node = CONCAT_WS('(',b.ID,')',b.Node) this statement to update node column from same table, but the problem is i have to execute many times to get the correct: example : ID Recommended_by Node 1 2 1 1 3 2 2 …

Member Avatar for LastMitch
0
87
Member Avatar for korathualex

Remove the last word while using left in sql query...I weant to avoid broken words while doing so... My query as follows: select top 2 tempJobTitle.id,tempJobTitle.JobRefId,tempJobTitle.JobTitle,LEFT (jobmaster.JobDescription2, 330)+'....' as JobDescription,jobmaster.PostedDate from tempJobTitle inner join jobmaster on jobmaster.JobRefId=tempJobTitle.JobRefId where tempJobTitle.Status='Approved' and jobmaster.ClosingDate >= '2013-03-01' order by tempJobTitle.DateofEntry desc

Member Avatar for adam_k
0
2K
Member Avatar for sundog1

Good morning Guys, I've got this code currently running: private void button1_Click(object sender, EventArgs e) { SqlDataSourceEnumerator sdse = SqlDataSourceEnumerator.Instance; DataTable table = sdse.GetDataSources(); foreach (DataRow row in table.Rows) { instanceCombobox.Items.Add(row["ServerName"].ToString() + "\\" + row["InstanceName"].ToString()); } Which gives me the Instance and Name of the SQL Server over the Network. …

Member Avatar for TnTinMN
0
226
Member Avatar for dbellerue

I am developing a VB6 application which connects with an Access 2010 database. I want the application to execute queries stored in the database. Some of the queries include Access functions in field names. For example- FieldName: IIf(Nz([AnotherFieldName],0)=0,3,[AnotherFieldName])" Is there a way in VB6 to execute the queries natively in …

Member Avatar for QVeen72
0
614
Member Avatar for subtlehulk

Hi, I have a problem with a code harness given to me by my tutor. Every time i enter values into a form, I get the following message: > Warning: mssql_query(): message: Invalid column name 'N56DSRT'. (severity 16) in /web/users/l1099341/SDD/insertCarController.php on line 27 Warning: mssql_query(): General SQL Server error: Check …

Member Avatar for pixelsoul
0
328
Member Avatar for HassaanJalil

**I am building a hospital managment system as a practice in visual basic. I am having some problem I want to write or read data from particular row or column with visual basics How do I o it? Thanks in Advance -Hassaan bin Jalil**

0
145
Member Avatar for cyberdaemon

Good day, I am having trouble with the computation in SQL. i want to subtract the intStock and the intTotal_OutBound_items to just to get the items available. here is my SP.. INSERT INTO CO09_Report ( intMaterial ,txtDescription ,txtMaterial_Type ,txtATP_check ,intDelivering_Plant ,intOrder_Quantity ,isHeld_by_Finance ,isRejected_OOS ,isRejected_Others ,intOpen_Order_Quantity ,intOrder_Quantity_NKA ,intOrder_Quantity_RKA ,intOrder_Quantity_Others ,intStock ,intDSD_Delivery …

Member Avatar for pritaeas
0
200
Member Avatar for ebc3142

Hi, I'm using this SQL statement to retrieve Value and Date which will then be plotted on a graph: SELECT DISTINCT assets.SEDOL,assets.Quantity,stock_names.value,stock_names.Fileid,date_header.dateid FROM assets,stock_names,date_header WHERE assets.Client_ref = '$clientref' AND stock_names.SEDOL = assets.SEDOL AND date_header.fileid = stock_names.fileid I'm also selecting Quantity. Instead of having to multiply out the arrays, how can …

Member Avatar for AleMonteiro
0
239
Member Avatar for verbalurbs

Hello I am trying to display an ID which is a primary key in my table by selecting the corresponding name in my table. the names have been saved in a combo box and depending on the name selected the textbox will display that Id. the code I have so …

Member Avatar for martinhosking
0
409
Member Avatar for slygoth

Hello I am trying to insert some data into a sql server i have but it seems like I'm formating the information wrong. This is what i have so far. product id = int; type = string; watt = float; volts = float; String query = "INSERT INTO GoodCustomer(Product ID, …

Member Avatar for bguild
0
156
Member Avatar for slpefanis

Hi All, i am not sure if this is the right forum, but i couldnt find a SQL section. I am writing an application to log data from our PLC system to a SQL database. I would like to write a record every second. I have it all working fine, …

Member Avatar for Reverend Jim
0
135
Member Avatar for kamil.metkowski

Hi I am trying to make a bike shop for my project and i need to pull out a product details with image from sql databse. I have made a table with products and i have stored the images url but i have no idea how to pull it out …

Member Avatar for EvolutionFallen
0
613
Member Avatar for Papa_Don

Group, The SQL Server (I'm using the edition that comes with Visual Studio 2010 Express) is different in every aspect form the database(s) that existed in the UNIX based program I work with over the last 15 years. There is much to learn and understand. With that said, I've connected …

Member Avatar for Reverend Jim
0
183
Member Avatar for A.Muqeetkhan

How would it be possible using T-SQL to find the raw amount of time that has passed between when the job started and when the job ended? i have used this function datediff(ss,grn_date,GETDATE()) . this function gets the jobs done how ever if the diffrence btw the dates is huge …

Member Avatar for AleMonteiro
0
178
Member Avatar for ebc3142

I'm using this PDO query to fetch all the data I need from Value and dateid: $pdo = new PDO('mysql:host=localhost;dbname=contisec_portal', 'root', ''); $date = date("o-m-d"); $stmt = $pdo->query("SELECT stock_names.Value,stock_names.Fileid,date_header.dateid FROM stock_names,date_header WHERE SEDOL = '$stocksel' AND date_header.fileid = stock_names.FileID"); Does anybody know how I can sort the two columns into …

Member Avatar for ebc3142
0
155
Member Avatar for dana2292
Member Avatar for AleMonteiro

Hello guys, I'm in need of some thinking help. I want to build an auto-complete text input to find cars, but I want it to search for Car Models and Car Manufactor too. In example, if the user type 'For', the suggestions would be 'Ford - Car 1' 'Ford - …

Member Avatar for AleMonteiro
0
250
Member Avatar for snehal89

Hey Everyone, I have table called vdet_sa_archive and in that table there are so many fields and i want to access the data on datetime range. sample data in table starttime endtime 1 14-02-13 01:30:15.000000000 AM 14-02-13 02:01:57.000000000 AM 2 14-02-13 4:30:01.000000000 AM 14-02-13 5:30:01.000000000 AM 3 14-02-13 01:30:01.000000000 PM …

Member Avatar for ghulamyassen
0
264
Member Avatar for xjshiya

Hello. I have two tables, the itinerary table and location table. The itinerary table consists of all the itinerary: * A - B * B - A * B - C * C - B * C - A * A - C The user will select from the itinerary …

Member Avatar for xjshiya
0
218
Member Avatar for Reverend Jim

A lot of questions in the VB.NET forum are database related. Most of the code that gets posted result in one or more comments like "use parameterized queries to avoid SQL injection attacks". I won't describe the nature of a SQL injection because it is easily looked up via google. …

Member Avatar for Reverend Jim
6
5K
Member Avatar for sobias

Hi guys, This is my first time using SQL. So, go easy on me :) I'm executing these queries on some websites online where there is an already made database with Country name,Area,Population,etc What I would like to do is, to get the names of all the countries in Asia …

Member Avatar for pritaeas
0
203
Member Avatar for minimee120

Hello all, I'm fairly new to using PHP, and for my assignment I've coded it all but I'm trying to go the extra step, and code something that if the item amount = 0 it doesn't print it out on the order form The items are $LAPTOP $MONITOR $KEYBOARD $PRINTER …

Member Avatar for diafol
0
209
Member Avatar for prashant9928

Hello everyone, As a freelance i am working on my own project name myOnlineDesk. I want to make a module in admin section where i can create a database backup file and save to the system. The thing that i want is ".SQL" file. When i click on a Backup …

Member Avatar for hometownnerd
0
834
Member Avatar for nok.nee21

I'm planning to develop a system that can connect through online sql database and a website connected on the same sql database.. Can anyone help me.. Please response..

Member Avatar for nok.nee21
2
129
Member Avatar for sundog1

Hi guys, I'm hoping you can help here with a problem I am having with regards to filling a Dataset. It was working fine but have had to amend the code to read a different data set and structure. Basics are 2 tables.. one customers, 1 orders. Joined on there …

Member Avatar for sundog1
0
338
Member Avatar for sofien.fkih

I am using GUI in netbeans to create a combo box. I want to import all data of a column from database dynamically not manually to a combo box.

Member Avatar for softswing
0
103
Member Avatar for Lethugs

Hi, Im trying to get the depreciation value of an equipment every month. My system gets the number of months from date of purchased up to current date for the computation of depreciation. I can run the report anytime but the computation must be like this: Sample: Date purchased January …

Member Avatar for Lethugs
0
397
Member Avatar for Stuugie

Hi All, I'm having a go at SQL queries and have the following: SELECT b.vSeries_Table_Number, b.vSeries_Number, b.vSeries_Geography, b.vSeries_Type,b.vSeries_Unit_Type, a.Variable_Date, a.Variable_Value FROM tblPopulationSC AS a INNER JOIN tblVSeriesList AS b ON a.vSeries_ID = b.vSeries_ID and b.vSeries_Geography='Manitoba' --and b.vSeries_Unit_Type=' 15 to 64 years' and b.vSeries_Type=' Both sexes' and b.vSeries_Unit_Type=' 65 years and …

Member Avatar for adam_k
0
265
Member Avatar for CreatorZeus

trying to search by the file name keep getting a "expects parameter 1 to be resource, boolean" error what am i missing? $pagename = basename($_SERVER['PHP_SELF'], ".php"); mysql_select_db("tagpoint", $con); $sql="SELECT * FROM tagpoint WHERE title = '".$pagename."'"; $result=@mysql_query($sql); $row = mysql_fetch_array($result);

Member Avatar for LastMitch
0
224
Member Avatar for lukas.vandendijssel

Hello, I know I shouldn't use mysql_. So I have a mysql_query which updates my table (for a hit counter). However, when I open the page, I get to see this: > You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version …

Member Avatar for lukas.vandendijssel
0
186
Member Avatar for sofien.fkih

I have done the following codes to create a bar chart with the data from DB, and save it as an JPEG file. I wanted to add percentage value anywhere in the table, JDBCCategoryDataset dataset = new JDBCCategoryDataset("", "oracle.jdbc.OracleDriver", "", ""); String query = "SELECT std,id from table"; dataset.executeQuery(query); JFreeChart …

Member Avatar for nandosss
0
130
Member Avatar for sathishk20

Collapse | Copy Code int s1 = Convert.ToInt16(dataGridView1.CurrentRow.Cells[3].Value); int s2 = Convert.ToInt16(dataGridView1.CurrentRow.Cells[6].Value); int s3 = s1 * s2; dataGridView1.CurrentRow.Cells[38].Value = s3; this is working fine when i change the value lively in dataGridView1.CurrentRow.Cells[3] it multiply with the changed value with dataGridView1.CurrentRow.Cells[6] and display the value in dataGridView1.CurrentRow.Cells[38] like cell[3] cell[6] …

Member Avatar for castajiz_2
0
256
Member Avatar for sundog1

Hi guys, I've been cracking on with this project for a few days now and had lots of useful pointers to help along the way. I've now hit a little snag where I think I have written the correct update Statement but It seems to error at the last point. …

Member Avatar for ChrisHunter
0
266
Member Avatar for bleedsgreen33

I inherited a website here at work. The menu system uses a convoluted jquery / javascript structure. There are 8 different types of "users" for this website, from administrator to contractor or accountant, etc, and the person made 8 different versions of the menus covering nearly 80 different pages within …

Member Avatar for tokick4
0
3K
Member Avatar for sundog1

Hi Guys, The reason for my message was to do with UPDATE and DELETE Statements from within C# when contacting a MDB file. I currently have the INSERT INTO SQL Query working perfectly The Code I used for this is below: else if (radioButton2.Checked == true) { //Creates new versions …

Member Avatar for ChrisHunter
0
191
Member Avatar for pritaeas

I want to have the following on SQL Azure: IF EXISTS(SELECT * FROM [sys].[databases] WHERE [name] = db_name() AND [compatibility_level] = 110) BEGIN ALTER PROCEDURE [dbo].[Test] AS BEGIN -- Omitted body containing lots of strings END END or a work-around that does something similar. What follows is what I'm trying …

Member Avatar for pritaeas
0
155
Member Avatar for collin_ola

Hi, I seem to be having a problem when attempting to insert a new record into my database through vb.net. From what I can gather, there seems to be an error in the code that the command builder (cBuilder) is creating for me. Here's a copy of the code for …

Member Avatar for Reverend Jim
0
5K
Member Avatar for sundog1

Hi again guys... I have a little but of an issue with a select statement I cannot seem to fathem out. Below is the code: else if (radioButton3.Checked == true) ; { //Looks at the row Selected in the GridView and then takes the Account Number and Stores in a …

Member Avatar for sundog1
0
170
Member Avatar for 2mhzbrain

Sirs, please suggest a good way to handle large amount of data. This is my newbie idea: - create a database on one of high powered pc(dedicated for whole company) - then sync every changes to another copy of this database to the online hosting service with security note: theres …

Member Avatar for drjohn
0
417

The End.