9,022 Topics
Hi, I have a problem where I need to search on data set with 5 fields. Field 1 - Account number Field 2 - Date Field 3 - Person1 Field 4 - Person2 Field 5 - Person3 The data sat contains two months of data (November and October). I need …
I am creating a dll library that impacts SQL Server on Northwind data, when run in VS2005 C# gets this error: Use 'dbo' could not execute stored procedure 'master.dbo.sp_enable_sql_debug' on SQL Server (local)\sqlexpress. Click help for more information. How to fix this ?
nearly finish my IS but i can't find any tips on how to create a database if not exist. most problem on my codes are the sql connection, mine to help please?
How do i format my Query result so it has thousand seperator and only to 2 decimal places <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Daily Sales</title> <link rel="stylesheet" href="../styles/login.css" media="all" /> </head> <body class="normal"> <?php include("../includes/x3connect.php"); ?> <?php $sql="SELECT SUM …
Hi I have the following code that i can run in MSSQL Query and the result are returned correctly but when i try to run it in PHP it errors what do I need to change to get it to work please. SELECT SUM (CASE WHEN FFP.BPARTNER.CUR_0='GBP' THEN (FFP.SORDERQ.YORIQTY_0 * …
Dear all, I have a scenario, where I have a single table with all my users listed in them. Each user also has a field indicating the user they report to. UserID UserDisplayName UserReportsTo ----------- ------------------------------------------------------------ ------------- 8 Anthony Karimi 3 9 naheed kassam 8 1 Administrator 1 3 Ramakrishna …
Dear Friends, i Developed a C# Project with SQL Server Database (Database is not LocalDB) and i want to create a setup file to install on client system havin windows xp 32bit. Please suggest me how to do it ?
how to Generate Auto Alpha numeric Inv. number in SQL Store procedure i used Sql Server 2008 r2 and vb.net 2012 I got a error ---- *Msg 245, Level 16, State 1, Procedure P_GetAutoIDPurchaseInv, Line 13 Conversion failed when converting the varchar value '17-18/00002' to data type int. * When …
After installing win7 and install SQL 2005 opens the error, see the video attached: http://www.mediafire.com/file/wmuzvn8wx3yii0u/ErrorConnectSQL2005.swf you know how to fix this error ?
Suppose you have 3 tables: TABHDBH, TABHDBHCHUYEN and TABHDBHCT Table TABHDBH has the following fields: NGAY DateTime; IDHDBH int ... Table IDHDBHCT has the following fields: MAHDBH int ... TABHDBHCHUYEN NGAYCHUYEN datetime MAHDBH int ... RELATIONSHIP OF 3 TABLE TABHDBHCHUYEN.MAHDBH head n TABHDBH.IDHDBH head 1 TABHDBHCT.MAHDBH head n DELETE T1 …
Dear Friends, I facing problem to change color of DGV Row w.e.o Quantity of Remaining days. I tried it but i got error. PLease, check my code. public void RowsColor() { for (int i = 0; i < dataGridView1.Rows.Count; i++) { int val = Int32.Parse(dataGridView1.Rows[i].Cells[5].Value.ToString()); if (val < 14) { …
So here is my problem laid out as simple as I can put it. I cant combine multiple entities together that have related data but are different (one database table has id number that is shared by database table 2 and table 2 has employee number which is shared with …
What I'm trying to do is have a login type windows form to take a user name and password then compare these with data in the db then open an admin type form. I've been trying to get this to work for a few days now with no luck, about …
Hi, I am following a walkthrough of [Entity Framework Code First to a New Database](https://msdn.microsoft.com/en-us/library/jj193542(v=vs.113).aspx) Everything appears to go as expected right through to the end of step 4, where it says "We can now inspect the schema that Code First created." The database shows up under data connections in …
How to Update Sql database from vb.net 2010 i want to add a stored procedure in sql database from login time on button click.. **database name ** db17-18 **stored procedure** Create Proc P_SelectAllRole As Select StatusId,Status from tblStatusMaster
I am trying to get the position of students in an exam. The SQL query I wrote uses the DENSE_RANK() function and it works properly just that it does not leave spaces after equal positions. I understand I can achieve that using the RANK() function. I Tried using the RANK() …
I have the following query, to group the records but not the group was thanks to you only help, the end when running excel file view: SELECT TOP (100) PERCENT dbo.TABNHANVIENCA.CANV, dbo.TABHDBHCT.TENSP, dbo.TABDONVI.TENDVT, SUM(dbo.TABHDBHCT.SOLUONG) AS SL, SUM(dbo.TABHDBH.DOITRA) AS DTRA, dbo.TABHDBHCT.GIABAN AS DONGIA, CASE TABHDBH.DOITRA WHEN 0 THEN (TABHDBHCT.SOLUONG * TABHDBHCT.GIABAN) …
Dear Friends, I want to save Date from DataGridView to Database. my Date Datatype is DateTime in DB. please, check my code private void button4_Click(object sender, EventArgs e) { con.Open(); for (int i = 0; i < dataGridView1.Rows.Count - 1; i++) { SqlCommand cmd = new SqlCommand("INSERT INTO cat1_tab (myDate) …
i have a logical error in my code where by i will read data into my four textboxes from sql database and the textboxes will be filled but when i click on a textbox the data will appear in the metrogrid(from metro framework) but when clicking another textbox the data …
Hi Guys, Kindy assist me to make this code work. I want the datagridview to populate data from SQL server 2012 database based on the employment number selected in the combobox. below is the code I have tried to generate. Private Sub btnRecords_Click(sender As Object, e As EventArgs) Handles btnRecords.Click …
Using Crystal Reports XI, and using the command feature with this simple query: select Field1 AS Item, Field2 AS Customer from Server.DB.dbo.Table whereField1 = {?Parameter_String} Returns an error: Conversion of Value overlowed an Int Column. If the parameter value is one that matches a record, it works. If the value …
I am a beginner practicing how to create tables on SQL Here is what I've done: Create Table PO (Order_id int primary key, order_date date, customer varchar(1000)); Create table PO_Line_Item (Order_id int not null, Line_number int not null, Product varchar (30), Unit_Price decimal (10,2), Qty decimal (10,2), Tax decimal(10,2)); When …
Hello Dear Friends, I need some help to check avilidity of the username on Leave event of a textbox in Database SQL Server, but i cann't get. it code is bellow private void textBox6_Leave(object sender, EventArgs e) { cmd = new SqlCommand("SELECT * FROM usertab WHERE username='"+textBox6.text+"'",con); SqlDataAdapter da = …
**problem** How to get cost per hotel and flight then add it in duration cost table based on flight date automatically . **Details** suppose i write flight date 26/07/2017 alexia 8days 04/08/2017 it must automatically get cost from hotel price table and price from flight then add it in duration …
Hi all I'm creating a warehouse management system, then i want when new orders are created, a customer's name be selected from a list box and that customer's selected name from a list box be the table name that will hold records of the table's order with a random number …
Please help on this one: SELECT Format([expr1],"# %") AS expr2, totvisit/totrem AS expr1 FROM ( SELECT Count(*) AS totrem FROM ( SELECT DISTINCT remid FROM remtable WHERE remtable.pacid = 94) AS r, ( SELECT Count(*) AS totvisit FROM ( SELECT DISTINCT visitaid FROM jurnal WHERE jurnal.pacient_id = 94) AS b …
Good Morning.. I Stored an pdf file to varbinary field in Sql Server successfully and retrieved is as it is but my problem is during retrieve i have to put some watermark on it , for that i tried fpdf methods but it didnt parse it so please help me …
I am currently trying to update a database using C# My issue is that the update query is not working, there is no error produced just reloads the screen and thats it. My C# is as follows void SaveRecords() { try { String qry = "Update Ordered_Test Set Ref_Phy = …
Server Error in '/' Application. Cannot open database "FDB" requested by the login. The login failed. Login failed for user 'fdb'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in …
I am using MS SQL and have logs that are in .mdf and .ldf format. It took us a while but we figured out how to get our new settings correct and coming in w3c format. The olf files are still .mdf and I need to know what I can …
Hello experts, I have to write a sql joining 6 tables. to retrieve classid, planname, workoutname,date,timeslot,status,staffemail and display them to a gridview. the tables are as below **tblclass** having columns *classid(PK)*, planallocationid*(FK to tblallocation)*, date, timeslotid*(FK to tbltimeslot),*status, staffid*(FK to tblstaff)* **tblallocation** having columns *planallocation(PK)*, planid*(FK to tblplan)*, workoutid*(FK to …
Hello Everyone, This website has really helped me as a newbie, thank you. But I really need help with some thing. I created a database table in vb.net using SQL ServerlocalDB. I also have a listview . I am trying to save items from the listview to some columns in …
Hi I am trying to populate textbox value based on releated textbox value like that of (Country and State) using dynamic row formate. I can able to populate a value for only first row, if i tried ti for second row its again overwrite the first row and also i …
To all database genius out there, I hope you can help me with this error I encountered when importing excel file to SQL Server 2005. This is the error: [CODE]Executing (Error) Messages Error 0xc020901c: Data Flow Task 1: There was an error with output column "Description" (21) on output "Excel …
I am trying to cast/ convert varchar to a numeric value. I have done this succesfuly when I eval the lower range, however I get an error when I do the upper range. this is my evaluation section that works. isnull(cast(measurmentdata.measvalue as numeric),0) < productinfo.lowerrange however when I try to …
i have vb.net windows app and i can insert data to acomputer where sqlserver is installed in the same lan but could not connect from another network(different lan)to the computer.
Hey,Guys now I need to know How to run an SQL stored procedure from sql through C# at a specific time? Any help please? ...
Hi guys, I have developed a windows application using vb.net 2012 and sqlserver express edition 2012. the application is able to access the database on a local hot computer. but when I take it to another compter on the same domain (networ). it is throwing the following error "Cannot open …
Sir I have these codes $last_date=""; $last_vno=""; $queryx = "SELECT MAX(t1.date)as mxdate,MAX(t1.vou_no)as mxvno,max(d1)as d1 FROM vouchers t1 WHERE t1.date = (SELECT MAX(t2.date)as date FROM vouchers t2 where vou_type='CP' and dr_amount>0)"; $resultx=sqlsrv_query($con,$queryx)or die("Error". sqlsrv_errors($con)) ; if ($resultx){ while ($rowx = sqlsrv_fetch_array ($resultx)){ $last_date=$rowx['mxdate']; $last_vno=$rowx['mxvno']; $myparty=$rowx['d1']; } }else{ echo "no data found"; …
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click provider = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" datafile = "E:\Software Development\Student Profiler\Student Profiler\School.accdb" connString = provider & datafile myConnection.ConnectionString = connString myConnection.Open() Dim str As String str = "Insert Into Basic_Information([ID],[Admitted In The Class],[Subject],[First Name Of The Student],[Middle Name Of The …
hello expert, i have three dropdownlist option consist of two string and one datetime that convert into string. If i want to choose first and second dropdown without the third one which is datetime, it occur error "the string was not recognized as a valid datetime. there is an unknown …
Hi friends , I have three table Countdown, Walk, Bon de reception The Id_marche is a foreign key in the countdown table and The Receipt table contains the Id_marche I want to insert in recordings in the counting table which contains Amount TTC so to calculate Amount TTC = TVA* …
I am creating a update member page. I would like the page to auto retrieve the information he or she originally used while registering on my site and display them into the individual textboxes of the update profile page, this is to prevent the hassle to rekey in every individual …
import java.io.*; import java.sql.*; import java.util.*; import javax.naming.*; public class Controller { public static String processUser(String sqlStmt, String whichSvlt){ String st =""; String first_name = null; String last_name; String ssn; String email; String address; String userid; String password; List<StudentInfo> result = new ArrayList<StudentInfo>(); // later I will use whichSvlt to …
Hi, i am trying to build Employee Attendance system and was successful in assigning TAGS to employees.now i want to calculate in/out timings of employees and which TAG swapped His/Her TAG without displaying any data to end user. i had tried basic sql query but seems to be not working. …
hi everyone how can i save a folder path in the sql server database and retrive it again by using vb.net 2010?
Hi please help me VB.NET source program that could get a name of database SQL Server file from user and show all tables and fields and size and also SP , view Please answer me If you put the source code of the program, I am very grateful Iam very …
I want to connect my database (sql) into a program i made on c in codeblocks but i cant find a way to do it
As it seems to come up often enough I figured I'd throw together a quick snippet outlining basic methods for data manipulation in SQL Server using C#. In all examples the coder will need to substitute their own connection string details and variables. I utilised parameters for 3 of the …
Hi all, I'm working on a SQL procedure to insert a row for new clients based on a template account that already exists in the database. I thought about Declaring a variable and selecting the value from the table one at a time, but with many columns needed, this seems …
The End.