Hi All,
I have a small excel program.
I would like to be able to use this program to update a SQL table.
What would be the function to say update line 2 in SQL table Test in Database ABC
Thanks
I don't know really how to word the question so please bear with me...
I have 3 classes: Server, Database, and Table. Each class has a "Name" property. How I want it to work is that each server can have multiple databases and each database can have multiple tables. So in the Server class I have this property.
Private _databases As List(Of Database)
Public Property Databases() As List(Of Database)
Get
Return _databases
End Get
Set(ByVal value As List(Of Database))
_databases = value
End Set
End Property
And I have something similar in the Database class for the tables. This works fine now because I can do something like this to get all the databases in the server.
For Each db In s.Databases 's being the server object
Debug.Print(db.Name)
Next
I would like to expand these classes. I want the server class to handle all the connection information and I would like the other classes to use the server class's connection information in them.
For example, I setup a server class and set the connection string to the server. Then I want the database class to use serverclass.connectionstring property to connect to the server and get a list of all the databases. But I want to keep that code in the database class. How can I do this?
I've attached some code of what I want to do.
Public Class Server
Private _name As String
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
Private _databases As List(Of Database)
Public Property Databases() As List(Of Database)
Get
Return _databases
End Get
Set(ByVal value As List(Of Database))
_databases = value
End Set
End Property
End Class
'-----New class
Public Class Database
Private _name As String
Public Property Name() As String
Get
Return _name
End Get
Set(ByVal value As String)
_name = value
End Set
End Property
Private _tables As List(Of Table)
Public Property Tables() As List(Of Table)
Get
Return _tables
End Get
Set(ByVal value As List(Of Table))
_tables = value
End Set
End Property
'This is where I need help!
Private Sub LoadTables ()
dim connectionstring as string = server.connectionstring 'Possible?
'Do database stuff
End Class
Thanks for reading!
hi all,
i'm having a scrollable table with fixed header.
would it be possible to have "snapped scrolling" on the scrollbar - which means that the table rows won't scroll pixel by pixel but snap responding to its row height, for better viewing.
thx
Hi everyone,i created an application that takes the excell output of a table.There are long numbers in table cell.When i took the output the cells that have long numbers are seen like that 1234+E34.how can i fix that?Thanks for advance...
I have a display object container and I am trying to add a paste event to it. But the event is not being registered. The documentation at liveDocs mentions that classes that derive from Interactive objects can dispatch paste event but I dont understand why it wouldnt work for me.
My app is not an AIR app, could it be a reason ?
Hello All,
I know its possible to create a table that has an index on the side and a search bar at the top that a user can type in to find an item, but is it possible to say to the table if array isEqual to "item1" push view1? I would like to push a different view with each cell. Anyone have any advice?
Is it possible to do something like this:
INSERT INTO table(col1, col2) VALUES(something_from_another_table, value);
With something_from_another_table being a SQL command? Like, is there something I can do that's equivelant to:
INSERT INTO table(col1, col2) VALUES((SELECT value FROM table2 WHERE id = 3), value);
I have a table on my web page that is populated with data like this:
<tr data-ng-repeat="row in grid.data | filter:isQuestionInRange">
<td>{{ row.problemId }}</td>
</tr>
Is there a way that I can put a count of the rows displayed in the table footer. Note that I want to be able to show the rows after that have been filtered not just the row count from the grid.data array.
target: whenever the table in the database changes, the treeview will reload the new contents of the table.
Is there any good methods to solve this problem? thank u
I am using the DataTables plugin for jQuery and need to get one of the table rows. DataTables has a fnGetNodes function that returns an Array with all of the DOMElements of the table. I would like to use a jQuery selector to find that row (I know the id of the row), but I need to convert the Array to a jQuery Object, is this possible?
Hi, can you help me with sql query?
I have this problem:
I have two tables
"Join" table: Reservation_has_meal
+----------------+
| id_reservation |
| id_meal |
| pieces |
+----------------+
and table with data: Meal
+-------------+
| id_meal |
| name |
+-------------+
Sample data for
Meal:
1 | carrot
2 | potatoe
3 | cucumber
Reservation_has_meal
1 | 2 | 5230
1 | 3 | 1203
How can I get this result for reservation with id_reservation=1:
id_meal | id_Reservation | name | pcs |
--------------------------------------------
1 | 1 | carrot | null|
2 | 1 | potatoe | 5230|
3 | 1 | cucumber | 1203|
--------------------------------------------
And result for id_reservation = 2:
id_meal | id_Reservation | name | pcs |
--------------------------------------------
1 | 2 | carrot | null|
2 | 2 | potatoe | null|
3 | 2 | cucumber | null|
--------------------------------------------
Thanks for advice.
Is it possible to link one MDB to another in a standalone manner?
Ie. If I have the accounts table in db1.mdb and the products table in db2.mdb, can both these MDBs be coded so that they can link to each of the tables in a seamless manner?
When I do \footnote{} for a value in a table, the footnote doesn't show up. How do I get it to show up? Also, is it possible to get it to show up at the bottom of the table rather than the bottom of the page?
I'm working on a mock exam paper at the moment, however I have no set of correct answers and I'm not sure what the correct answer of this SQL query is.
Given a table:
foo, bar
a , 1
b , 3
a , 2
c , 1
and the query:
SELECT foo, sum(bar)
FROM table
GROUP BY foo
The two ways I can see this going are either:
a 3
a 3
b 3
c 1
or
a 3
b 3
c 1
Thanks.
for a table valued function in sql why cant we write sql statements inside begin and end tags like-
create function dbo.emptable()
returns Table
as
BEGIN --it throws an error
return (select id, name, salary from employee)
END
go
while in scalar valued function we can use these tags like
create function dbo.countemp()
returns int
as
begin
return (select count(*) from employee)
end
go
is there any specific rule where we should use BEGIN & END tags
I have the following query
SELECT *
FROM attend
RIGHT OUTER JOIN noattend ON attend.date = noattend.date2
WHERE attend.date
BETWEEN '2010-02-01'
AND '2010-04-01'
AND attend.customerid =1
ORDER BY date DESC
LIMIT 0 , 30
Attend is the table with customerid
noattend is the table with a row for each date (date2) I followed the advice in other questions to right outer join it to create values where there is no record in attend but it still isn't filling in the empties
any help much appreciated
I have a table with an 'expires' datetime column. I want to find all the items that have an 'expires' date earlier than now.
I've tried
session.query(Item).filter(Item.expires < now())
but it doesn't return anything regardless of the dates in the table.
I'm using PostgreSQL 8.4.
How do I do this comparison?
Pages with tables creating problem in print? First page coming blank and content comes in print from 2nd page.
and if table is long i want to print table heading on each print page also.
I have an ASP pg with a formview list control on it that hooks up to a sql database customer table
I want to access the customer name outside the form.
How do I:
A) access the bound text box in the form view template? Something like Text1.text=formview1.customername.text (that doesn't work but that's the kinda thing)
B) access the database field in the table that the sqlsource connects to to feed the formview
Really appreciate the help. I bet it's easy to do but I'm just not getting there.
Hello,
I've a system, that have two types of users (Companies and individuals).all types have a shared set of properties but they differ in another. What is the best design merge all in one table that allows null for unmatched properties, or separate them in two tables related to a basic table with a one to one relationship.
Thanks.
I've been looking into JOIN, subqueries and other ways of doing this, but I can't work out the best way to do this is...
I have a table (ps_category_product):
id_product, id_category
I want to perform a query on it like:
SELECT id_product FROM ps_category_product WHERE id_category='$this_cat'
BUT, I only want to perform this query where the ID's are returned by a query on another table (ps_product):
id_product, active
SELECT id_product FROM ps_product WHERE active='1'
Can anyone help me with getting these two queries working together?
Basically i want to keep the transaction very simple but i should be able to rollback if any error in the later part.
Something like mentioned below,
BEGIN TRANSACTION
DELETE SET 1(this will delete first set of table)
COMMIT
DELETE SET 2 (will delete second set of table)
If any error occurs while deleting set 2 i should be able to rollback set 1 transaction as well.Let me know if we have any options to do like this. Appreciate for your help.
i have a 5 stars rating system, on javascript!!! bau i want to update mysql table, when clicking on stars!!! can somebody tell me how can i update the table!!!
thanks. . .
I have a table view with a list of categories and each category (understand table cell) has a different icon.
I would like to use one big image (sprite) and render different part of the image (single icon) for each row.
Any efficient ideas...