Re: Google Gadget
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Wed, 12 Mar 2008 15:41:35 -0400
bagega wrote:
On 12 Mar, 18:46, "Bob Barrows [MVP]" <reb01...@xxxxxxxxxxxxxxx>JavaScript? Are you doing this in a web page?
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...
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.
.
- References:
- Google Gadget
- From: bagega
- Re: Google Gadget
- From: Bob Barrows [MVP]
- Re: Google Gadget
- From: bagega
- Re: Google Gadget
- From: Bob Barrows [MVP]
- Re: Google Gadget
- From: bagega
- Google Gadget
- Prev by Date: Re: Google Gadget
- Next by Date: Re: Filter Property with ADO, VB6 and SQL extremely slow
- Previous by thread: Re: Google Gadget
- Next by thread: Re: Filter Property with ADO, VB6 and SQL extremely slow
- Index(es):
Relevant Pages
|
|