shassbel's Q&A profile
SQL Server creating tables
I am trying to go through an arraylist and create some database tables for each entry in the array. what I have is Dim ques As String For Each ques In questions query = "create Table " + ques + " (plantid nvarchar(100), Answer nvarchar(100))" cmd = New SqlCeCommand(query, con) cmd.ExecuteNonQuery() Next I am wanting to use the item in the arraylist as the name of the db. I am getting an error saying There was an error parsing the query. [ Token line number = 1,Token line offset = 14,Token in error = 1 ] Can anyone see what I am doing wrong. Character 14 (the t ...Show All
SQL Server Report builder using SQL SERVER 2005
Hi All!! Can any body help me out in how to build reports using SQL SERVER 2005. I will be very thankfull for that Thanks Biresh Singh Hi!! Can any one tell me that if i build report in SQL EXPRESS 2005 and deploying it.And now the problem comes while intergating my report with my application bulid in .NET Framework 1.1. I am using VS.NET 2003. Can i integrate my report with NET Framework 1.1 Please reply. I will be very thankfull for that thanks Biresh singh ...Show All
SQL Server Run Variable in DataReader Source?
Hi all, I am trying to have a DataReader Source that can run a variable which I used to store the SQL statement. For example, I have: Variable #1 Variable name: tablename Data Type: string Value: "name_of_table" Variable #2 Variable name: sql_stmt Data Type: string Value: "SELECT * FROM " + @tablename I want to use DataReader Source to run Variable #2 in the SqlCommand that connects to an ODBC connection. If it is possible by any way, please let me know. Thanks in advance. Daren Thank you Adrian. I have been looking for this answer ...Show All
Visual Basic Default Properties and Shared Properties
Can someone help me regarding Default Property (Class) and Shared (Static) Properties. ...Show All
Windows Forms Datagrid edit form
Hello, I am currently working on a C# project that has datagrid on it. I am trying to figure out a way to doubleclick on a row of data and have it open that record in a form to edit/delete the record. I have the datagrid and edit form created but I am having a problem with the code for the "doubleclick" event of the ...Show All
.NET Development Showing data in a DatagridView or ListBox - VB 2005
Hello, i made a ODBC connection and it works. The problem is, i want to display the data in a datagrid o listbox and i just get blank fields in the grid, and in the listbox i get "System.Data.DataRowView". As a novice i don't know what's the inconveninet. Help please.. This is the code: Dim StrConn As String = "DSN=blabla;UID=user;PWD=password" Dim MyConn As New OdbcConnection(StrConn) Dim MySelect As String = "Select campo1, campo2 from tabla" Dim MyDataAdapter As New OdbcDataAdapter MyConn.Open() Dim MyTable As New DataTable MyDataAdapter.SelectCommand = ...Show All
Windows Forms create timeline control in c#
Hi, I need to create a timeline control in c#. But I don't even know what it is. And the timeline control should be C# managed control patterned after Outlook’s Journal. And I have no idea what that means. I need some help to get started. Tutorial or any advice will be very helpful thanks a lot google "janu ...Show All
Windows Forms bug in toolbar conponent?
I if put a toolbar component in a panel or other container object (e.g. the group box), then make its style "flat", it goes nuts and draws random garble all through the toolbar (bits of lines, sometimes things from the window underneath the form). If the toolbar is set to "standard" buttons, it works fine. Also, can I turn off the t ...Show All
Visual C# Thread safe wrapper around generic dictionary
Could someone give me a pointer as to how I might implement a thread safe wrapper around a genric dictionary I've written thread-safe dictionaries in C# 1.x by inheriting from the DictionaryBase but I'm a bit stumped as to how to acheive this using Generics. TIA Danny Tobin, thanks for the feedback. In the absence of any other guidance over the last month I implemented the first option, the 'sub'-class. Not elegant but it works. I am very much a threading newbie so to be honest the discussions you've been having with Tag have largely gone over my head. All I'm doing in my class is usi ...Show All
SQL Server insert counter
when a new record is inserted in to table, i want to increment the variable called counter by 1 how can i implement this what is the IDENTITY field in a table is it something like a counter variable pls let me know An identity column can increase by 1 everytime you add a new record. That means you can use it as a counter. But when you delete some records in this table then it doesnt effect this counter. I dont know what your perpose is . But identity fields are commonly used for primary keys. I think that is what you wanted to know. If not please explain what you are going to use it for. ...Show All
Visual Studio 2008 (Pre-release) Hierarchies in DataContracts
Is it sensible to create a hierarchy using DataContracts For instance i would like to have one DataContract contain a (generic) list of children that are also DataContracts. What are the issues in doing this Secondly I'm not sure of what my options are regarding initialization of the members of a DataContract. Do I have to have a create method on my ServiceContract for every DataContract I wish to initialize I only really want to initialize value types and instantiate a List (see above). Does this require a call to a service method Thanks for any advice, Dave. There's certainly no problem nesting DataCon ...Show All
Visual Studio Team System ? VS2005: How to SuppressMessage for an entire class ?
I'm porting a load of our VS2003 code to VS2005, and at the same time trying to clean up the code by running Code Analysis on it. My biggest problem is with a load of structs that I have defined for P/Invoking Windows API functions. For example, the Windows API function called MEMORY_BASIC_INFORMATION: public struct MemoryBasicInfo { public IntPtr BaseAddress; public IntPtr AllocationBase; public int AllocationProtect; public int RegionSize; public int State; public int Protect; public int MemType; ...Show All
Visual C# procedure question sql
if give someone my database.. will it have my defined procedures ...Show All
.NET Development FileSystemWatcher Problem
I have windows service, in OnStart I do the following: FileSystemWatcher fsw = new FileSystemWatcher(); fsw.Path = @"d:\data"; fsw.InternalBufferSize = 10005; fsw.IncludeSubdirectories = true ; fsw.EnableRaisingEvents = ...Show All
Visual Basic ADODC Control
The one sentace version: ADODC refresh doesnt work. So I've got this form designed to edit domain tables and their fields. Each domain table has two fields, ID and Value. Basically the form has a combo box which lists the tables, there's a datagrid which lists the fields and values of the selected table and there's a frame with a two text boxes (id & field) used for editing values. There's a 2-dimentional array, TableList that keeps track of the table names and their associated field names. I have an ADODC control that is set up fine with the Access database. Cursor Location: Use Client Cursor Type: Open Static. As for the ...Show All
