Re: Google Gadget



bagega wrote:
On 12 Mar, 18:46, "Bob Barrows [MVP]" <reb01...@xxxxxxxxxxxxxxx>
wrote:
bagega wrote:
On 12 Mar, 12:35, "Bob Barrows [MVP]" <reb01...@xxxxxxxxxxxxxxx>
wrote:
DBMS: SQLServer2005

Oops, I missed this the first time I read it

<snip>

what datatypes are needed for those two columns? INT
2. What programming language and platform are you using? I'm using
google gadget SDK

An SDK is not a programming language. It is a set of classes meant
to be
used by a developer in some programming language (VB, VB.Net,
vbscript,
Java, C++, etc). I am not familiar with this google sdk so will be
unable to help you with anything regarding it. I can, however, help
with
ADO if you tell us what programming language you are using.

3. Where specifically do you need help? I need to know how store
the value of the value in the first row of a column of a table

A database table is by definition an unordered set of rows and
columns,
so there is no such thing as the "first row" of a column. The
database
designer needs to provide a column or a group of columns to act as
the
key to the rows of a table. If that key allows the first row that was
entered into the table to be identified, then that will help perform
your task.

Given the information you've provided, inserting a row into your
table
is simply (using vbscript):

dim cn, sql
sql = "insert into helpme(ONE,TWO) values (1,1)"
set cn=createobject("adodb.connection")
cn.open "provider=sqlncli;data source=MYSERVER;" & _
"initial catalog=YourDatabase;user id=xxxxx;password=xxxxx"
cn.execute sql,,129
cn.close:set cn=nothing

4. In Google desktop developer forum they told me to use ADOdb, and
it didn't sound a bad idea

The ADO documentation can be found
here:http://msdn2.microsoft.com/en-us/library/ms675532.aspx --
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get
a
quicker response by posting to the newsgroup.

With first row of a table I wanted to mean that the table will have
just a record (row), it probably doesn't make sense, but that's what I
need.
I'm going to produce java script...


JavaScript? Are you doing this in a web page?
Anyways, I'm not as good with that language. If I steer you wrong here,
check with the people at microsoft.public.scripting.jscript or
comp.lang.javascript.

To insert a row:
sql = "insert into helpme(ONE,TWO) values (1,1)";

To update the values in the row:
sql="update helpme set ONE=2,TWO=3"

Either statement would be executed the same way (I'm not sure exactly
where capitalization needs to occur - again, check with the javascript
people if I steer you wrong):
var cn=new ActiveXObject("adodb.connection");
cn.open("provider=sqlncli;data source=MYSERVER;initial
catalog=YourDatabase;user id=xxxxx;password=xxxxx");
cn.execute(sql,null,129);
cn.close();


To retrieve the data:
var cn, sql, rs, var1, var2
//instantiate and open cn as above, then:
sql="select [ONE],[TWO] FROM HELPME";
rs=cn.execute(sql,null,1);
if (!rs.EOF) {
var1=rs.Fields(0).value;
var2=rs.Fields(1).value;}

rs.close();cn.close();

For more help, you should post to a javascript group.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


.



Relevant Pages

  • Re: Google Gadget
    ... google gadget SDK ... An SDK is not a programming language. ... so there is no such thing as the "first row" of a column. ...
    (microsoft.public.data.ado)
  • Re: Google Gadget
    ... google gadget SDK ... An SDK is not a programming language. ... so there is no such thing as the "first row" of a column. ...
    (microsoft.public.data.ado)
  • Re: What is a platform builder?
    ... platform that was created with Platform Builder. ... > and library files are not in the SDK for the device, ... >>> programming language you prefer and the devices you are targeting. ... >>> please indicate which newsgroup and message). ...
    (microsoft.public.windowsce.embedded)
  • Re: Newbie question: Why Fortran?
    ... > that would be very topical in that newsgroup. ... the cross post to CLC and CLC++. ... generally confine themselves to NA issues which are programming language ...
    (comp.lang.c)
  • Re: Newbie question: Why Fortran?
    ... > that would be very topical in that newsgroup. ... the cross post to CLC and CLC++. ... generally confine themselves to NA issues which are programming language ...
    (comp.lang.fortran)