9,022 Topics
Hi everyone! I am bignner in vb.net and i have develo[ed a small application of vb forms in which i have use a service based sql server databas(.mdf)i want to make its msi installer last time i have made it and after installation application giving error for connecting to sql …
Hi, I got a question to check if a date time is within another date range (So as to check conflicting schedule) There are various possible types of schedule: 1: One time start - end event. Typically such schedules is like a tour / outing / camp event, and hence …
Dear Experts, I am building a program which needs to store an Image (any image type) in SQL Express 2008. I am able to read, and insert images into SQL Datatable, but I can't seem to update my images. The SQL DataTable contains columnname "picture" - Varbinary(Max) I am using …
Hello How can I clone a database in MS SQL 2005 Express? I have the original database and I want to create a new database that has to be the same as the original one. regards, Vedro
How can I secure SQL SERVER 2000? I am using windows authentication mode and it doesnt have additional user name or password. As a result anyone can open SQL SERVER 2000. I need to know how can I secure it so that none can open & edit data from enterprise …
[CODE] private void btThem_Click(object sender, EventArgs e) { for(int i=0;i<dataGridView1.Rows.Count-1;i++) { if(dataGridView1.Rows[i].Cells["Checked"].Value ==true) { cmTheoHocLop.Parameters["@X"].Value = tbMSSV.Text; cmTheoHocLop.Parameters["@Y"].Value = dataGridView1.Rows[i].Cells["MaLop"].Value; sqlConnection1.Open(); cmTheoHocLop.ExecuteNonQuery(); sqlConnection1.Close(); } } } [/CODE] it has a error :Error 3 Operator '==' cannot be applied to operands of type 'object' and 'bool' D:\lvthao\QLHP\QLHP\FrmDKHP.cs 48 20 QLHP Thanks …
Dear freinds i want to get specific data in gridview specifc cell with the help of sql query from sql table i put the following query but it doesn't work [code] Sql = "select e.item_no from nitmtbl e,purchaseitem g where e.item_name=g.item_name and g.item_name='grovita sp'" Da = New SqlDataAdapter(Sql, Class1.Connection) Da.SelectCommand.ExecuteNonQuery() …
I'm extreamly new to programming actually learning on my own, college is not an option now. Need some help. I'm trying to write the code to add users to sql 2005 backend server, and a windows login form. so that certain area's of my program have restricted access. Can anyone …
When I try to design relation database using MSSQL Server 2008, I find that the MSSQL Server 2008 allow designer can create two relationships with one direction from a table to other table (for example, I have two table A an B, I can create two relationship from table A …
hi friends, can u please help me the code how connect to SQL server in vb.net using c#.. i m waiting for your help
Hello, for a database project (music festivals) several search options are to be included. While some search fields will be filled from a dropdown list (like "countries"), other will have a fuzzy option (like "song titles"). For this I want to use the full-text search (you may remember the words …
Hi, I am using SqlDataSource in order to bind data to dropdownlist and looking for a simple way to change text color based on specific value from database. Any idea if I can manipulate the SqlDataSource to do that? Is this something that I have to call from code-behind? This …
Hello Forum, I am having trouble retrieving data from a stored procedure that I have set up as a Data Adapter using VB.NET 2005. The Database is SQL Server 2000, and what I am trying to access is a simple Stored Procedure that will validate a users login access. Details: …
Hi, I'm currently designing the schema of my database for an application. and there's this table that has a default content or records. i'm torn between what type should i use for its key, because im always using autonumber, i was thinking that because i have a default content for …
Hi! I need some help please! I have to create a DB that has to be normalized to 3NF. I have a table 'Products' that contains info about all the products - product_ID, product_name, quanitity (left in warehouse), procurement_price, sales_price. And I have [B]TWO[/B] more tables that contain info about …
hi, i use this code to create a crystal report [CODE] CrystalReport2 cr2 = new CrystalReport2(); Database1DataSet ds1 = new Database1DataSet(); SqlCeDataAdapter da = new SqlCeDataAdapter(selectquery, con); da.Fill(ds1, datatablename); crystalReportViewer1.ReportSource = cr2; [/CODE] the problem is that this code displays just the first record from the records that should be …
Hi Guys, feel quite stupid with this one, been staring at it for ages. What to combine three tables with the left join sql. keep getting the syntax error in Join operation. [CODE]SELECT SubmittedTeam FROM (NETT LEFT JOIN NETT ON NETT.SubmittedTeam = Team.Team) LEFT JOIN tempDate ON NETT.Date = tempDate.date …
I've spent the last couple of days researching how to connect to a database server and modify the data in that server. I was able to find a lot of information on how to Read from a database, but I found very little material to assist with Writing to a …
Hey Guys, I'm connecting to an SQL server and updating some fields. This works: [code=c#]cmd = new SqlCommand("UPDATE Laptops SET Checkout_Date = '" + form_CheckOut.checkout + "' WHERE name='pen-laptop1'", conn); cmd.ExecuteNonQuery(); [/code] But this one doesn't: [code=c#] cmd = new SqlCommand("UPDATE Laptops SET " + " isCheckedOut = 0" + …
I am trying to insert data from one column in one database into a column in another db. the tables already have the column in place. they both have a unique identifier column (userid) I wrote a little insert statement, but when I try it I get the following error …
hi, let consider, A table has following fields, name amount date I know to get sum of amount based for particular date condition be.. select sum(amount) as val from table_name where date='06-16-2010' Same as I want to get list of name for a particular date. How can I achieve this..
Hey all. I'm trying to write a query that gets all the multi-field data from a record in another table it has a relationship with. I'm using MS Access 2007 and would prefer to have it written in a SQL query. Here's an example of what I'm trying to do: …
I want to store a map that is drawn using Map info software, then store it into the database, but I have not known about spatial data in sql server I tried creating a table using geometry data type like: [CODE] use master go CREATE TABLE Districts ( DistrictId int …
Hello every bdy dre......... I have developed the desktop (windows form) application using C# , with MS SQL 2005 database. That is separate application run in four different centers with their own separate database, but now i want to make it centralized database. For all four center has only one …
Hi there, I am trying to create an upload functionality for my application. User can only upload an excel format file. I already have a standard formatted excel (which means i don't have to worry about the column fields,file extension, excel version etc..). User just have to fill the cells. …
hello all! Anyone know how to count all the constraints in a given table? I'm new to stored procedure and need it to finish some work.
Hello, I have a web service in which i am making connection to the database to get data..now i want that the app pool account should be used to make the connection and not the current user's credentials..can somebody tell me step by step what changes do i need to …
i try to insert data in database, but i have a problem. example: [CODE]double price = 12,55; mySelectQuery = "INSERT INTO order (total)" + "VALUES (" + price+ ");";[/CODE] now price are 2 values because the ",". now C# see 12 and 55. so a get a error that a …
please tell me how i make a sql query for selecting data's from a table where that data repeated 4 times in that column
Hi all, i want to transfer data one sql database to another database in same sql server. i try to insert into table2 select * from table1 , but this query useful for same database, but i want to use different database, in same sql server. help me here to …
Hi all, i started programming with .NET (i have express edition) and wanted to make a conection to an SQL Server.. the problem is that i cant conect :( previously i had .net 2005 - i started having the issue there - i unistalled it, n installed visual studio 2008. …
hi,i want to know how to export sql server 2005 database to access through vb.net coding..no need to select n insert table one by one,just save package...
Hello, I have a table which has mail body...i.e. it has html code in the column ..i need to make changes to one of the rows in the mail body column. I have made the changes and when i am trying to copy and paste the column. I am getting …
i am using database with table RESUME and column PageIndex in it which type is number in database but when i want to store this PageIndex value to an integer i get exception error **Specified cast is not valid.** here is the code [CODE] string sql; string conString = "Provider=Microsoft.ACE.OLEDB.12.0; …
Hi Everyone, I developed a page with [URL="http://freetextbox.com/"]FreeTextBox[/URL] object which allows update text using rich text format. Now, If I type "TEST 123" and submit the data - works fine. If I type "TEST 123' and submit the data - I recieve the following error: Syntax error (missing operator) in …
Hi, This is my code. Here I want to retrieve return value of stored procedure. when I am executing this, I am receiving exception as string[1] string invalid index[0]. coding.. cmd.CommandText = "sp_dat_enc" Dim params() As OleDbParameter = {New OleDbParameter("@pVisitDates", r("visit_dates").ToString)} Dim ret_val As New OleDbParameter("@DataOut", OleDbType.VarChar) ret_val.Direction = ParameterDirection.ReturnValue …
hallo evryone...i have just installed sql 2005 on winxp and i was wondering how do i access remotely the server from another computer. i want to know the softwares to download for the client computer..should i also run sql server 2005....i don't know how to access the server...kindly assist
I have loaded combo as following. [CODE]cmdString = "select propertytypeid,typename from propertytype "; da = new SqlDataAdapter(cmdString, conString); dt_PropertyType = new DataTable(); da.Fill(dt_PropertyType); cmb_PropertyType.DisplayMember = "Name"; cmb_PropertyType.ValueMember = "ID"; arr = new ArrayList(); for (int i = 0; i < dt_PropertyType.Rows.Count; i++) { arr.Add(new KeyValueData(dt_PropertyType.Rows[i][1].ToString(),int.Parse(dt_PropertyType.Rows[i][0].ToString()))); } cmb_PropertyType.DataSource = arr;[/CODE] [COLOR="Red"]but …
Hello, I have a SQL Server DataBase and have about 10,00,000 entries to be inserted into the database before the database becomes operational. I am currently performing an insert query for each entry, as they have to be read from a file and decided into which table they should be …
this is my simple application , i try to updata ,but it is not working, in this example it shows only first reocrd and, try to update first record(i want to know the method of updating, so i can updates other records too) data base has only two fields id,name …
Is there a method for checking which roles a user has in SQL using SMO? I can add a role via: [CODE]user.AddToRole("Administrators")[/CODE] But cannot see an obvious method to progmatically list them.
Can Someone Tell Me how to make a auto posting form . I need theat form for automatic pots ip on sql db, Please Help Thx.
Hey all I'm currently working on a project for university where multiple users will be able to access the same data concurrently. Up to this point, I've only ever created programs for a single workstation and I have no idea where to start to create a program that multiple users …
[COLOR="Green"]Table Name => PropDocument Column1 => propertyid ( foreign key from Property table ) Column2 => documentid ( foreign key from Document table ) The error ( in the attached image ) comes when I try to delete the record. This error comes often when there are 2 records with …
Hello there, Im trying to write a query where if a query is run on a set of tables and the result of that query is null then i want it to run a different query based on different tables. i.e. [CODE]SELECT CASE WHEN (Resulting Value from this query is …
updating into two tables is possible?
i have a datagridview with last column is a checkbox.When user check on a row or rows, i will add columns' contents on that row into a new row in sql database. Please help me! Thank you so much!
Hi I'm trying to load a treeview from 4 tables in the database, i'm using the code attached. The problem is that only 2 of the nodes show up, as soon as I get down product level, the node will not show up. Can anyone see where I went wrong?[code]private …
I have a details view and SQL data source. In the details view i can fill the form and add the data to the database and then view this database in another page. I have a "Date" row in the details view where must insert the date info. I want …
Can any body explain me[B] Adding parameters to AddParams method [/B] I cant understand the code in this code it try to delete a row from article table, for that i use SqlDataAdapter,DataSet and DataTable , //Preparing Delete Sql Command [CODE] dataAdapter.DeleteCommand=conn.CreateCommand(); dataAdapter.DeleteCommand.CommandText="DELETE FROM article WHERE artId=@artId"; AddParams(dataAdapter.DeleteCommand,"artId"); [/CODE] This …
The End.