Re: help with SQL queries

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: sean (sean_NO_SPAM_at_shopsmart.com.au)
Date: 07/01/04


Date: Thu, 1 Jul 2004 22:43:17 +1000

hey there,

index = somevalue from somewhere

WHERE CompanyAssets.AssetCategoryID =" & index, conn1)

HTH - Sean

"agassi" <zerrifi@yahoo.fr> wrote in message
news:58da9239.0407010413.d8e40a4@posting.google.com...
> hi guys,
> i want to select from the database using a query with a variable name.
> but it's not working. can you tell me what is wrong with my code(i'm
> using C++.NET):
>
> int index = textBox1->Text->ToInt32(0);
>
> myadapter1 = new Data::OleDb::OleDbDataAdapter("SELECT AssetID, Make,
> Model, YearAcquired, Price, Description FROM CompanyAssets WHERE
> CompanyAssets.AssetCategoryID = & index &",conn1);
> myadapter1->Fill(mydataset);
>
> i think the problem comes from : & index & but i dont know to solve
> it. please help!!



Relevant Pages

  • RE: Deleting rows using VBA
    ... Database such as Access. ... You can then just run a query to retrieve the max ... I never like deleting data because as soon as it is gone ... > HTH ...
    (microsoft.public.excel.programming)
  • Re: How to get parameter info for a SP?
    ... Cristian Babu ... > I would like to query a database to get information about the number of ...
    (microsoft.public.sqlserver.programming)
  • Re: is there a way to run a query as soon as you open the database
    ... that i dont always have to manually run this query ... i open the database ...
    (microsoft.public.access.macros)
  • Delete
    ... back up your database just in case. ... prompted when creating a new query in design view). ... HTH ...
    (microsoft.public.access.queries)
  • Re: DBMS and lisp, etc.
    ... Naively implemented with SQL, again for 10 ... (1 query for the initial orders, 1 query for each order for its ... soon as you upgrade to the SQL database. ... (eq (order-customer orderA) ...
    (comp.lang.lisp)