9,022 Topics
How can I connect to a SQL server(not SQL Compact Edition)Database from my Smart device. I am a bit stuck on this because the connection string does not seem to work it gives me a (Null reference error) I checked the SQLcommand text and that was working properly as well …
i'm attempting to use a select statement which retrieves products 'LIKE' textbox.text. However, i am given an error and cannot find a solution private void buttonSearch_Click(object sender, EventArgs e) { if (radioButtonCustomerID.Checked == true) { try { sqlConnectionNW.Open(); sqlDataAdapterSearch.SelectCommand = "SELECT * FROM Customers WHERE (CustomerID LIKE'" + textBoxSearch.Text + …
I created a stored procedure in SQL which will accept parameters from a vb.net textbox. I want it to output the count of records. stored proc: [CODE] USE [Traffic] GO /****** Object: StoredProcedure [CENTRAL\TIMOVKP].[spReturnValue] Script Date: 08/02/2010 08:57:13 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [CENTRAL\TIMOVKP].[spReturnValue] …
Hello friends plz help again How to coding in save button and how to convert the database in SQL Server 2005 in DropDown List becoz in sql take date in mm\dd\yy and in asp.net i m create the form dd\mm\yy? plz help me...
Could someone tell me how could setting up index would affect my select statement? I read that it boost performance especially for finding specific values, but how?
I'm running MSSQL Server 2008 I did this: set CLASSPATH= C:\Program Files\Microsoft SQL Server JDBC Driver 3.0\sqljdbc_3.0\enu\sqljdbc4.jar (I dont know where I can check if this has been executed correctly) Then when approaching this URL: [url]http://localhost:8983/solr/db/dataimport?command=full-import[/url] Using this data-config.xml: [code=xml]<dataConfig> <dataSource driver="com.microsoft.sqlserver.jdbc.SQLServerDriver" url="jdbc:sqlserver://localhost:1433;databaseName=wedding" user="sa" password="r00kw0rst" /> <document name="weddinglocations"> <entity name="location" …
Insert Image in sql 2005 and retrive it with simple code. i TRY many solution it is easyly inserted but fetch is not posible image isnot show and even the code is so difficult to understant i want simple code like 1,name 2,photo only that kind of code i like …
i have procedure like this select count(*),sum(Transaction_Amount),dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) from Collect_Transaction where convert(nvarchar(10),Created_On ,101) between @Date_From and @Date_To group by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) order by dateadd(hour, datediff(hour, 0, Created_On), 0),convert(nvarchar(10),Created_On ,105) but it displays time when it has an entry . but when it …
[CODE]declare @Search_String nvarchar(50); set @Search_String =null select * from Punnu1 where Column11 like case when @Search_String is null then '%%' else '%'+@Search_String+'%' end[/CODE] i have a query like this . but this does not take any element in column1 with values null. what should i do to take query with …
Hi, Filling treeview database of stored data. but as the sum of the data childNode parentNode is increasing. To give some examples; + Products - Bread + Products - Tomato I have a problem, as above. + + Products - Bread - Domat want to be like. My code is …
how do I populate a datagrid in a smart device with data from a sql database(not SQL CE)
Hi. plz tell me how I can connect to an SQL server to an microcontroller or a PC using C language.... Plz reply soon....
I have developed a vb.net database application(desktop application with sql 2005).I managed to create setup files(.msi) which is running on my pc.but when i install this application on my client system the application is running but all database operations fails.Pls any one suggest a solution. Thanks in advance.
hi friends..I am very new C# so please dont mine if anything is wrong in my code. actually i am doing a very small project in c# i.e Employee Tracking System well i completed my project but when i use image i am getting exception called Argument exception.. Actually my …
I am running a service that queries on regular intervals. I initially set it up so that the connection formed onStart, and closed onStop. This of course leaves a connection open all the time, which isn't what I want. So I moved the open and closed to inside my timer …
Hi. I am new to this forum/community and need help to join multiple result sets in SQL. The last time I used SQL was in 2000. The goal is to provide one single data set result from multiple queries. I have included the code from two queries that I have …
I have some text with Cyrillic and Latin (š, đ, č, ć, ž). How can I store that data in MS SQL 2008. I tried to store word 'Palačinka' but instead of 'č' i get 'c'.
Hi every one i would like some help on my project for software development that will mark my end of year and am really trying to figure out what i should work on. Any one please with cool ideas help me. It should be in java and Databases we have …
To access MySql tables from PHP, I use the PHP code and the function below. If I make these changes, would this code work for SQL Server 2008? mysql_fetch_array to mssql_fetch_array mysql_connect to mssql_connect mysql_select_db to mssql_select_db mysql_query to mssql_query PHP code -------------------------------------------------------------------------------- $sql = "SELECT mast_id FROM district_mast WHERE …
I have passed values from one page to another using query but it is not accepting the update i.e When i click on update button nothing happens [CODE] SqlConnection con = new SqlConnection("Data Source=SNSS1\\SQLEXPRESS;Initial Catalog=Employee;User ID=sa;Password=eLog!234"); int empid = Convert.ToInt32(Request.QueryString["ID"].ToString()); string strSQL = " UPDATE Tbl_Employee SET FirstName=@FirstName,LastName=@LastName,EmpID=@EmpID,PhoneNumber=@PhoneNumber,Salary=@Salary WHERE ID="+empid …
[CODE] SqlCommand cmd = new SqlCommand("SELECT MAX(Register_ID) AS Register_ID FROM EnrollTbl", con); SqlDataReader reader; con.Open(); reader = cmd.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { RegisterID.Text = (Convert.ToInt32(reader["Register_ID"]) + 1).ToString(); } } else { RegisterID.Text = "10000"; } reader.Close();[/CODE] It says [B]Object cannot be cast from DBNull to other types.[/B] I …
Hi I am very new to C#. Below is the program which i am trying. { string connstring = "Data Source = .\\SQLEXPRESS;Initial Catalog = SAMP; Integrated Security = True"; SqlConnection conn = new SqlConnection(connstring); SqlCommand comm = new SqlCommand(); comm.Connection = conn; SqlDataAdapter myadapter = new SqlDataAdapter(comm); DataSet myset …
I am learning VB and am working on a tutorial on databases. The recordset is a disconnected set. I am getting a concurrency exception. I might have 3 records. I delete all 3. Then I add a record, it adds it. Then I attempt to delete it and it fails. …
I have 2 datagrids. In first datagrid i am taking details of student which had done enquiry in classes.This data is used for the particular day followup in classes.In second datagrid i am taking details of details of students to whom followup is done that particular day.Inshort iam transfering the …
dear all, I am developing a web application for a Training Hostel, in my application i need to produce a report for achievements by the Inmates. For individual achievements it is no problem but when it comes to an achievement by a team, i am stucked to display all the …
Hi Everyone! Wow, when I received the invite that stated Daniweb is the friendliest IT Forum on the web, I can attest that this is certainly true. A little bit about me (and there is not much), I studied SQL 2000 and became Microsoft certified literally 10 years ago. I …
[attach=right]14422[/attach]File under oops. The website of The Telegraph newspaper has been defaced by hackers, apparently upset at a cult British television show and the newspaper itself for mocking their country. The 'Romania National Security' hacking group has claimed responsibility for the attack which hit a couple of third party services …
Hi. I am very new to VBA and the task in hand is a tough one to start with. Basically I have requirement of code I can run using Active X in DTS to load data that sits in excel files in a certain folder location into an sql server …
Hy there everyone! I try to make one application that will first show login form (with textbox for username and password) and when I press login client application send request to server side application that make SQL query (local) and return some values and that values listed in main form. …
Hello everybody, I'm having the same problem. I can connect to a SQL server with default instance (no named), but can't connect to a named instance! I tried escaping backslashes, and putting port number, with no success. Examples: $connection = mssql_connect('MYSERVER', 'USER', 'PWD'); --> WORKS OK $connection = mssql_connect('MYSERVER\INSTANCE', 'USER', …
Hi, i get the following error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. this is my code [CODE] import java.sql.*; public class DetOrderNum{ public static void main(String[] args){ Connection con=null; ResultSet rs=null; Statement stmt=null; int pkey=0; String itemn="jin"; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:MY-PIZZA","",""); String q="select order_num from Order where …
Hey team, i'm having a problem with this query, [code] "SELECT * FROM marketingDB WHERE company_name LIKE 'allied' & '*'" [/code] the program ive written runs fine and it doesnt show any problem with the query infact the exact same query works fine on access but when i put it …
NEED HELP~! Does anyone know how to import access data into sql server using vb.net? I want to create a openfiledialog and allow user to choose which access file to be imported into the server. Thank you so much~~ >.< PS. I am just a beginner of vb.net. So would …
HI this is my code.it uses access database.But givs me this error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in FROM clause. import java.sql.*; public class DetOrderNum{ public static void main(String[] args){ Connection con=null; ResultSet rs=null; Statement stmt=null; int pkey=0; String mn="jin"; try{ Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); con=DriverManager.getConnection("jdbc:odbc:MY-PIZZA","",""); String q="select order_num from Order …
I know this is probably a stupid post but I cannot think of how to accomplish this. How do you do the equivilent to an autonumber in a SQL Server table? Please let me know my project is very close to deadline Thanks in advance
I am having a problem with the SQL INSERT command in VB. I am trying in move data from one table to another. The problem is I am going from a table with duplicates to one with no duplicates. Since there are duplicates the SQL statement bombs. Here is the …
I've been googling for a few days and have tried all kinds of connection strings, but none have worked so far. I have a webpage on one server (using ASP NOT ASP.NET) trying to connect to a SQL database on another server (SQL 2005 server). I tried connecting using .net …
Hi guys i'm using ASP.net ans SQL server 2005 with stored procedure to do simple search from a table in database.Plz help me out The error i get Function or procedure expects @searchKey which was not supplied. protected void btnSearch_Click(object sender, EventArgs e) { string constring = ConfigurationManager.AppSettings.Get("con").ToString(); SqlConnection conn …
hi,how to access the SQL sever database using ASP.NET.i can not access the server by using the same.some errors are showing when i try to create a database.can you help me to create a database?
Good Morning, I have inherited a database that I am not happy with the structure of. In the system there are components on the web application it reads as Level1, Level2, Level3. The tables are set up as Component ->Level1 Component ->Level2 Component ->Level3 The component table houses the level …
Hi All, I have been pulling my hair out over this one. What we are trying to do is pull sum values for the same item out of three different tables in the same DB (MSSQL '05) – Should be quite straight forward however... The result should look a bit …
Hi, Is there any way to do this? I tried using a 'select scope_identity()', but that returns null, apparently because my identity column is not a numeric of any sort. An answer to this would help me a lot! I would love to not have to use an integer or …
[CODE] SqlCeDataAdapter adp = new SqlCeDataAdapter("select * from gmembers where GID = "+current_group, con);[/CODE] What I was trying to do is to Select all the records from table gmembers where GID is a string variabe. I would also like to mention that actuall data type of GID is INT. probably …
I'm trying to call a linked server, SS2000 that has NText field and instert that data into an nvarchar(120) field on SS2008. If I execute the SPROC from SS Management Studio, it works fine. If I try to call the SPROC from my web application, I don't get any errors, …
i have a format for printing and printin must be done in that format only also the page setup shud be shown i tried this code but not gettin anything with the format so plz help Try Dim con As New SqlConnection("conn str") Dim cm As New SqlCommand cm.Connection = …
hello to everyone! im new in C# can somebody help me with my simple problem.. I have 2 forms. First Form named Main_Menu and it has toolStrip named File,Add,Edit,Search under File theres a sub menu Login. _________________________________________________________________________________________ Second Form named Login Login form was connected in SQL Server _________________________________________________________________________________________ So …
Can anayone help me how to retrieve the picture in Sql 2005?i need a simple a code plz help huhu,
I have a pages table with following columns: DB Table: sno name title url parentPage 1 Reports Reports [url]http://1[/url] 0 2 Reports Local [url]http://2[/url] 1 3 Reports Intl [url]http://3[/url] 1 Now I need to to display the label as Report - Local: So report will be linked to the parentpage …
does anyone know how to use the vb.net to connect to the SQL server to get the no of rows of a file in the server? I am a beginner of vb.net would u pls tell me the solution in detail. THANK YOU!!!
Hi guys, Im running on PHP 5.3, Apache/2.2.12 (Win32 and SQL server 2008 using the sqlsrv driver 2.0. I have no problems connecting to my db instance using either Windows or server authentication as i Have enabled both. I use Windows auth for the application. I have enabled remote connections. …
The End.