Member Avatar

Hello guys, i've the following table in database : IdCity int CityName nvarchar(20) it has the data like this in it : IdCity CityName 1 Абакан 2 Азов 3 Александров 4 Алексин 5 Альметьевск 6 Анапа when i try to run the following view SELECT IdCity, CityName FROM dbo.City WHERE (CityName = 'Абакан') i get the results null, althought that record in the table i tried to add a record with cityname= 'abc' and ran the view with this parameter, it worked fine so it only doesn't get results written in russian any ideas? SQL query problem with any language …

Member Avatar
0
41
Member Avatar

I inserted data in sql server using asp.net (MVC 5), and its flowing nicely, but my problem is this. I don't want to insert in sql the exist data. How can I do it?

Member Avatar
0
37
Member Avatar

Hello! I have written a simple program which connects netbeans with SQL Server database. The program is giving an exception. I am displaying the source code of my program and exception below. Please guide me to solve this problem. public class dbconnection { Connection con = null; public static void main(String args[]) throws ClassNotFoundException, SQLException{ try { Connection con = null; Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver"); con = DriverManager.getConnection("jdbc:sqlserver://SABOOR-PC\\SQLEXPRESS;databaseName = Test;integratedSecurity = true;"); Statement st = con.createStatement(); String sql = "SELECT *FROM Employees"; ResultSet rs = st.executeQuery(sql); while(rs.next()) { String EmployeeName = rs.getString("EmpName"); String EmployeeWage = rs.getString("Wage"); System.out.println(EmployeeName + " "+ EmployeeWage); }// end …

Member Avatar
0
17
Member Avatar

Group, I'm trying to import an EXCEL table into an SQL Server Table. Although new to SQL, I've done it several times. However for the first time I'm having to import a column that is a date. I'm not sure how the EXCEL column should be formatted so that it can be easily inserted into the sql table. Should the EXCEL column be formated as a 'Date'? If so, in what format ('mm/dd/yyyy', 'yyyy/mm/dd', 'mmddyyyy', 'yyyymmdd', etc.)? In advance, thanks for all the help. Don

Member Avatar
0
22
Member Avatar

I'm having some real trouble running some basic queries that I should be able to run easily. I have a table called settings. When I query `SELECT * FROM settings` I get the output: +----+-----------------+--------------------------------+ | ID | key | value | +----+-----------------+--------------------------------+ | 1 | view | default | | 2 | sitename | value! | | 3 | siteurl | | | 4 | captcha.enabled | 0 | | 5 | upload_path | http://web/uploads | +----+-----------------+--------------------------------+ However, when I then run the simply query `SELECT key FROM settings WHERE ID > 0` I get an error! "You have …

Member Avatar
0
15
Member Avatar

Hello, currently on one of my development servers I have SQL Server 2014 installed, the problem I HAD was that when I executed any of my PHP sites connected to various databases I was getting `SQLSTATE[HY2000][2002] Connection was activily refused...` I fixed that error by forwarding the port through the firewall, however I get a new error now `SQLSTATE[HY000] [2006] MySQL server has gone away` and I can't figure out how to fix it. From what I read online it seems as though this error is caused because my max packet isn't large enough and the request is timing out. …

Member Avatar
0
25
Member Avatar

Hi EveryOne, I have a following controls in my vb.net form: txtID txtName btnAddNew btnSave This form will be storing a values to the SQL Database (SQL Server 2005). In the txtID textbox the auto id should be generated when ever user clicks on btnAddNew. The ID should be generated in for digit i.e. 0000, 0001,0002, .... and so on. When the form is opened next time and when the user adds the new record, the ID should generate next value coz the ID will not be duplicated. Can anyone Help me? regards, TashiDuks

Member Avatar
0
39
Member Avatar

Hi, I have recently started working with SQL databases of which I have 0 previous experience. I have added the datasource to my project using the Visual Studio wizard and the DataSet appears in my solution explorer. Everything that I have read thus far has shown connecting to the SQL server and then sending query commands, but since I have added the direct reference to my project is this necessary. I thought since I had added the reference to my project I would have direct accesbility to it, but it appears that is not so. Also to help the searching …

Member Avatar
0
24
Member Avatar

Hi im attempting to copy a php code and get it to work with a script im trying to create and i have come across the error below can anyone tell me whats going off any help would be much appreicated x You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'to = "", meettype = "", county = "", cnumber = "", fee ' at line 2 here is my insert into database line $query = 'insert into booking set Firstname = "'.$Firstname.'", …

Member Avatar
0
52
Member Avatar

I want to add data to sql databse using vb.net form And I am new to programming :( I get an error message saying "Incorrect syntax near "deatails") Can somebody tell me the reason the following is the code I'm using Imports System.Data Imports System.Data.SqlClient Public Class Customer_Profile Dim con As New SqlConnection("Data Source=CHAMIKA; Initial Catalog=SunAndMoonResort; Integrated Security=True") Dim cmd As New SqlCommand Private Sub GroupBox1_Enter(sender As Object, e As EventArgs) Handles grpBoxCustDetails.Enter End Sub Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) End Sub Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles RadButtonCustProfileGender.CheckedChanged End Sub Private Sub Button3_Click(sender …

Member Avatar
0
41
Member Avatar

Hi! I'm using Microsoft Visual Studio 2008, Microsoft SQL Server Management Studio. I need help. I cant figure out this if else statement for this condition: ///to check condition either the way ID exist in database ///if not exist then way ID can be delete ///if exist, message box appear show message this cannot be delete My code was be like this. Protected Sub btnDelete_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnDelete.Click Dim i As Integer Dim iResult As Integer Dim hypWayID As HyperLink Dim chkRemove As New CheckBox Dim clsWay As New Way() Try For i = …

Member Avatar
0
19
Member Avatar

Hi. Im using VS2008 and SQL Server Management Studio 2008. I want to ask, i have two different table, TableA and TableB in same database, DatabaseX. Both table have two same column, ColumnY but the data are different within this table. Example: TableA, ColumnY : A1, B2, C3, D4 TableB, ColumnY : A1, B2, C3, D4, E5, F6, G7 I want to compared data between this two table in my program. How the SQL Statement look alike because I dont know how to compared between this to? And one more thing, can I just directly write the SQL statement in …

Member Avatar
0
52
Member Avatar

hello everybody...nice to back again i m working on project to calculate measures and numbers and insert data inside datagridview(dgv) from number.text and measure.text but if value of measure.text present in dgv son update number cell with new value + present value problem is how to do so.... i tried alot of sql statements but i have errors Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click If Not sqlcon.State = ConnectionState.Open Then ' open connection sqlcon.Open() End If com2 = New SqlCommand("UPDATE frames SET [number] = [number] + '" & number.Text & "' where measure = '" & …

Member Avatar
0
24
Member Avatar

Someone can help me to find my error: $query=mysqli_query($con," SELECT * FROM item WHERE ITEM = $ITEM ") or die ( mysqli_error($con)); i reciveing this error,i dont know wherer is syntax error. *You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' at line 1*

Member Avatar
0
48
Member Avatar

I'm trying to query from two tables but whenever i run my php script i get this error, any help would be highly appreciated Database query failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'student_code = '01' AND firstname = 'kabula' LIMIT 1' at line 1 $query = "SELECT student.student_code, student.firstname, student.middlename, student.lastname, student.gender, school.school_name "; $query .= "FROM student INNER JOIN school "; $query .= "ON student.school_code=school.school_code"; $query .= "WHERE student_code = '{$student_code}' "; $query .= "AND firstname = '{$firstname}' "; …

Member Avatar
0
13
Member Avatar

How to log-in in MVC uing sql server? Any recommendation?

Member Avatar
0
19
Member Avatar

Hi, after creating a software with SQL database (my other pc is the data server) this shown up " String or binary data would be truncated. The statement has been terminated " what to do? sometimes it imports the data sometimes it does not...

Member Avatar
0
5
Member Avatar

The database that I'm working for has been suddenly corrupted. Fortunately, I performed a backup on it and save to a backup tape. Therefore, I reinstalled SQL Server and I tried to restore those backup. However, it failed and I suspect that maybe the backup is corrupted too as well. Is there any possibility on it?

Member Avatar
-1
11
Member Avatar

how to fix [DBNETLIB] ConnectionOpen(Connect()).]SQL server http://i.gyazo.com/3e7e693141fd157da860907218fbb1a0.png this is UID and password of my SQL server I try to insert but this is the problem I get http://i.gyazo.com/c903e03c7d697b7b8c2c80933e99e376.png and this is at my other pc so had to make pics with my phone. any idea how to fix this?

Member Avatar
0
9
Member Avatar

Hi I am working in weekly Newspaper company. There are 15000 subscriber, subscribed for next 3 to 4 years.Per year 52 weeks and I have to generate issue number based on week(1001......3000) for each subscriber and store into data table. I am using mssql 2012. I have written the Store Procedure (I have given below) working fine. But it takes long time more then half an hour when execute into server. If using aspx pages, it stop working. I have also increased time out. No Use. Pls check my store procedure and advise me how to do thank you Maideen …

Member Avatar
0
14
Member Avatar

Hello :) I'm trying to create web application. I followed the tutorial given in this site : http://aspsnippets.c...-in-ASPNet.aspx My problem now, after I create a table and the UI. Next step show about stored procedure. What is stored procedure use for? Do I need this even though I had a table in my database? I'm using SQL Server Management Studio 2008 as my database platform. Thank you :)

Member Avatar
0
16
Member Avatar

Hi guys, I want to multiply or add the values of two or more cells in a datagridview control in a row and and should also be auto-saved in the database after entering datas in the cell. I am using SQL Server 2008 for my database. Please do take a look at the screenshot attachment that I made for further details.. I don't know what code to use, so I did not put any codes in this discussion. Thanks guys..

Member Avatar
0
87
Member Avatar

I have the following table User in my database Name(Varchar) DateOfBirth(datetime) Age(int) Name(Varchar) | DateOfBirth(datetime) | Age(int) John | 2014-12-20 23:59:59 | 0 Mary | 2014-12-20 23:59:59 | 1 How can i verify throught javascript if the field DateOfBirth of the table User of the database z is of type datetime?

Member Avatar
0
14
Member Avatar

Alright, so the following has stumpted me and a few others in the office, and we just can't figure it out. I have develope a program that allows us to go out to a specific database and search one of the fields based on specified values. Now that seems all simple and everything, except this field, its XML. We are searching for values within the XML (not the whole thing). To do this I am using a SQL statement like so cast(TxOriginal as varchar(max)) LIKE '%name="Branch" value=" 25"%' Now this works fine except for one small problem. Notice the leading …

Member Avatar
0
33
Member Avatar

I'm using: Windows 7 Home Premium 64-bit operating system Netbeans IDE 8.0 WAMP Server 2.5 Here is my issiue. I am attempting to follow the E-commerce tutorial in the Netbeans Java EE & Java Web learning trail (Section 3 "The NetBeans E-commerce Tutorial - Setting up the Development Environment"). In the 3rd part of that section is "Communicating with the Database Server". I'm trying to check if the MySql server is running using the command shell> mysqladmin ping Should return: "mysqld is alive" If the server is runnig or: "mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to …

Member Avatar
0
18
Member Avatar

i'm not sure what is the syntax error. I try in this source code in dreamweaver, it shows line 8 is a syntax error. $destination = realpath(‘../../app/webroot/uploads/excel/’); App::import(‘Vendor’, ‘php-excel-reader/excel_reader2’); //import statement class UploadsController extends RealTimeAnalysisAppController public function upload() { $destination = realpath(‘../../app/webroot/uploads/excel/’); //Set your upload path here if(isset($_FILES['Upload']['XLS_File'])); $ext = substr($_FILES['Upload']['XLS_File'], strrpos($_FILES['Upload']['XLS_File'], ‘.’) + 1); $path = $destination.’excel.’.$ext; move_uploaded_file($_FILES['Upload']['tmp_name'], $path); $data = new Spreadsheet_Excel_Reader($path, true); $temp = $data->dumptoarray(); if($temp) { foreach ($temp as $key=>$val) { $val['0']; } } }}

Member Avatar
0
24
Member Avatar

Hi, I have 3 tables Description, Item, Transaction Description Item Transaction DeID Name IID Name DeID TranNo Type IID Date 1 Printer 1 Stylus T10 1 1 Repair 1 2 Monitor 2 HP 1 2 Repair 3 3 ViewSonic 2 I need to count how many printers, Monitors etc. are in Item and how many are under repair eg. there are 2 printers in item, and 1 under repair output should be: Description count under repair Printer 2 1 Monitor 1 1 Im using vb.net 2010 and sql server 2008 r2 as much as possible not using stored proc Thanks …

Member Avatar
0
8
Member Avatar

I'm testing out wdcalendar, a jquery based calendar for a wesbite. Some info on it: [url]http://www.webappers.com/2010/06/08/wdcalendar-jquery-based-google-calendar-clone/[/url] The installation instructions are simple, but not detailed so maybe im screwing up somewhere. They go as follows: Copy the unzipped directory into the apache www directory/sub-directory. For a database: Create a database, execute setup.sql Change php/dbconfig.php to fit yours rename edit.db.php to edit.php and php/datafeed.db.php to php/datafeed/php And thats it for the instructions. My experience with mysql is nil so i followed a debian guide. [CODE] sudo apt-get install mysql-server amarok $ mysql -u root -p Enter password: mysql> create database amarokdb; mysql> …

Member Avatar
0
6
Member Avatar

I am trying to connect a Crystal report to my database.mdf i.e SQL Server database. When using the wizard At the [I]Database Expert[/I] window after choosing the [I]OLE DB (ADO) [/I]i can not find any server and a database in the drop down menu. how to get that? i have tried viewing tutorials. I have also restarted the SQL Service from the configuration manager.:sad:

Member Avatar
0
10
Member Avatar

[code] Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click connetionString = ("server=192.9.200.82;database=eKalyan;user id=invite;password=invite") MessageBox.Show("connection established") sql = ("select newuniqueid,newteh_code,newpcate_cd,newplano, pen_nm,rel_cd,pen_fnm,ccate_cd,pan_code,pvillage,ppo_cd,spo_cd,start_qtr,last_qtr,bundle_typ,bundle_no,mo_srno,pen_amt,pen_comm,status,operatorcode from ekalyan.welpen") cnn = New SqlConnection(connetionString) Try cnn.Open() cmdd = New SqlCommand(sql, cnn) cmdd.ExecuteNonQuery() cnn.Close() MsgBox(" ExecuteNonQuery in SqlCommand executed !!") Catch ex As Exception MsgBox("cannot open the connection") End Try 'Dim objdataadapter1 As New SqlDataAdapter("select Teh_code,Pcate_Cd,Wtng_No,Applicationdate,Pen_Nm,Rel_Cd1,Pen_Fnm,pan_code,Po_Cd,disabilitypercentage,Ccate_Cd,IndiviualsIncome,Village from ekalyan.WtngN", objconnection) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try Dim cn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\database1.mdb") cn.Open() str = "insert into Table1(newuniqueid,newteh_code,newpcate_cd,newplano, pen_nm,rel_cd,pen_fnm,ccate_cd,pan_code,pvillage,ppo_cd,spo_cd,start_qtr,last_qtr,bundle_typ,bundle_no,mo_srno,pen_amt,pen_comm,status,operatorcode) values (@newuniqueid,@newteh_code,@newpcate_cd,@newplano, @pen_nm,@rel_cd,@pen_fnm,@ccate_cd,@pan_code,@pvillage,@ppo_cd,@spo_cd,@start_qtr,@last_qtr,@bundle_typ,@bundle_no,@mo_srno,@pen_amt,@pen_comm,@status,@operatorcode)IN 'C:\Table1.mdb'" cmd = New OleDbCommand(str, …

Member Avatar
0
41

The End.