SourceTec Software

It is currently Wed Apr 23, 2014 3:57 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Fri Mar 28, 2008 4:45 pm 
Offline
Member

Joined: Fri Mar 28, 2008 4:40 pm
Posts: 8
Dear Sir/Madam,

I am struggling on MS SQL database connection string for sothink image scroller.

Could you please advise me?

My Code as Below:-
------------------------
sts_bs("jwscroller5faf",[20080215,"","","blank.gif",0,1,1,4,"100%","left",1,3,100,120,1],["none",1,"#454545","#FFFFFF","","repeat"]);
sts_til([0,"Hot's Deal","left"],["bold 9pt Verdana,Arial","#000000","none","transparent","scroller/bgtitle.gif","repeat"]);
sts_pag(["transparent","7pt Verdana,Arial","#000000","none","transparent","7pt Verdana,Arial","#000000","none","#336600","7pt Verdana,Arial","#FFFFFF","none","#336600","7pt Verdana,Arial","#FFFFFF","none"]);
sts_sca(["center","middle","center","middle"],["scroller/arrowl_out.gif","arrowl_over.gif","scroller/arrowl_gray.gif",13,13,"scroller/arrowr_out.gif","scroller/arrowr_over.gif","scroller/arrowr_gray.gif",13,13]);
sts_sbd([1],["solid",1,"#454545",5,"scroller/round_tl.gif","scroller/round_tr.gif","scroller/round_br.gif","scroller/round_bl.gif","transparent","scroller/round_t.gif","repeat","transparent","scroller/round_r.gif","repeat","transparent","scroller/round_b.gif","repeat","transparent","scroller/round_l.gif","repeat"]);
sts_tbd([1],["solid",1,"#454545",5,"scroller/round_tl.gif","scroller/round_tr.gif","scroller/round_br.gif","scroller/round_bl.gif","transparent","scroller/round_t.gif","repeat","transparent","scroller/round_r.gif","repeat","transparent","round_b.gif","repeat","transparent","scroller/round_l.gif","repeat"]);

/*<%@ LANGUAGE=JScript %>
<!--#include File="adojavas.inc"-->
<%
// Connection string.
//var strCon = "Provider=sqloledb;Data Source=myServer;Initial Catalog=Northwind;User Id=myUser;Password=myPassword";
var strCon = "PROVIDER=SQLOLEDB.1;PERSIST SECURITY INFO=TRUE; INITIAL CATALOG=SUPERDB;DATA SOURCE=GTDB;USER ID=G8;PASSWORD=G8;";

// Create the required ADO objects.
conn = Server.CreateObject("ADODB.Connection");
rs = Server.CreateObject("ADODB.recordset");

// Open the connection.
conn.Open(strCon);

// Retrieve some records.
var strSQL = "Select * from webcmsproduct";
rs.CursorLocation = adUseClient;
rs.Open(strSQL, conn, adOpenStatic, adLockOptimistic);

// Disconnect the recordset.
DisconnectRecordset(rs);

// Release the connection.
conn.Close();



while(!rs.eof)
{
var sName = rs("productcode");
var sDesc = rs("details")+"";
sDesc=sDesc.replace(/\r\n/g,"\\r\\n");
var sLink = ""; //list_content("link")
var sImage=rs("smallimage");

%>*/
sts_ai("i0",[0,"<%=sName%>","","_self","<%=sImage%>",80,158,"center"],["transparent","7pt Verdana,Arial","#000000","none","7pt Verdana,Arial","#000000","none"]);
//sts_tip("i0",[0,"<%=sDesc%>","stEffect(\"rect\")","",80,0,0,0,"middle","center",1,1],["9pt Verdana,Arial","#000000","none","#FFFFFF","","repeat"]);
/*<%

rs.MoveNext();
}
conn = null;
rs.Close();
rs = null;
%>
*/
sts_es();


Thank you very Much.
Would very appreciate for your kindly reply.

Regards,
Michelle


Top
 Profile  
 
PostPosted: Fri Mar 28, 2008 5:20 pm 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
micnie2020 wrote:
Dear Sir/Madam,

I am struggling on MS SQL database connection string for sothink image scroller.

same as for any other connection, nothing special about sothink stuff that it needs a special connection. http://www.justfuckinggoogleit.com/


Top
 Profile  
 
PostPosted: Tue Apr 01, 2008 12:45 pm 
Offline
Member

Joined: Fri Mar 28, 2008 4:40 pm
Posts: 8
Dear Sir,

Thanx for your reply.

Anyway, can someone provide me the source code? I'm sure there is some people cannot get it.

Or Pls include the connection string at the user manual. Would appreciate for your kindly reply of the source code.

Thank you.

Regards,
Michelle


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 01, 2008 3:55 pm 
Offline
Support Team
Support Team
User avatar

Joined: Thu Aug 01, 2002 5:59 pm
Posts: 1808
Please try the following code:

/*<%@ LANGUAGE=JScript %>
<%
conn = Server.CreateObject("ADODB.Connection");
conn.Open("Provider=sqloledb;Data Source=(local);Initial Catalog=SUPERDB;User Id=xx;Password=xx;" );
rs = Server.CreateObject("ADODB.recordset");
rs.CursorLocation = 3;
rs.Open("Select * from webcmsproduct", conn, 1,1);
while(!rs.eof)
{
var sName = rs("productcode");
var sDesc = rs("details")+"";
sDesc=sDesc.replace(/\r\n/g,"\\r\\n");
var sLink = ""; //list_content("link")
var sImage=rs("smallimage");
%>*/
sts_ai("i0",[0,"<%=sName%>","","_self","<%=sImage%>",100,120,"center"],["transparent","9pt Verdana,Arial","#000000","none","9pt Verdana,Arial","#000000","none"]);
sts_tip("i0",[0,"<%=sDesc%>","stEffect(\"rect\")","",80,0,0,0,"middle","center",100,100],["9pt Verdana,Arial","#000000","none","#FFFFFF","","repeat"]);
/*<%

rs.MoveNext();
}
rs.Close(); delete rs;
conn.Close();delete conn;
%>
*/

Do change the user id and password.


Top
 Profile  
 
PostPosted: Wed Apr 02, 2008 2:03 pm 
Offline
Member

Joined: Fri Mar 28, 2008 4:40 pm
Posts: 8
Dear Team Support,

Thank you for your knowledge.

However it's doesn't work for me the code as mentioned above, but it's did give me ispiration on how to doing it.

Finally, I have figured out the successful source code as below:-

Code:
sts_bs("jwscroller01f2",[20080115,"","","blank.gif",0,0,0,50,"60%","left",1,6,80,158,1],["none",1,"#454545","#FFFFFF","","repeat"]);
sts_til([0,"Title","left"],["bold 9pt Verdana,Arial","#000000","none","transparent","bgtitle.gif","repeat"]);
sts_pag(["transparent","7pt Verdana,Arial","#000000","none","transparent","7pt Verdana,Arial","#000000","none","#336600","7pt Verdana,Arial","#FFFFFF","none","#336600","7pt Verdana,Arial","#FFFFFF","none"]);
sts_sca(["center","middle","center","middle"],["arrowl_out.gif","arrowl_over.gif","arrowl_gray.gif",13,13,"arrowr_out.gif","arrowr_over.gif","arrowr_gray.gif",13,13]);
sts_sbd([1],["solid",1,"#454545",5,"round_tl.gif","round_tr.gif","round_br.gif","round_bl.gif","transparent","round_t.gif","repeat","transparent","round_r.gif","repeat","transparent","round_b.gif","repeat","transparent","round_l.gif","repeat"]);
sts_tbd([1],["solid",1,"#454545",5,"round_tl.gif","round_tr.gif","round_br.gif","round_bl.gif","transparent","round_t.gif","repeat","transparent","round_r.gif","repeat","transparent","round_b.gif","repeat","transparent","round_l.gif","repeat"]);
/*<%@ LANGUAGE=JScript %>
<%
var connDynamic = Server.CreateObject("ADODB.Connection");
connDynamic.Open("PROVIDER=SQLOLEDB.1;PERSIST SECURITY INFO=TRUE; INITIAL CATALOG=superdb;DATA SOURCE=local;USER ID=SA;PASSWORD=;");

sqlQR="Select * From webcmsproduct";
var rs = Server.CreateObject("ADODB.Recordset");
rs.open(sqlQR,connDynamic,3,3);

while(!rs.eof)
{
var sName = rs("productcode");
var sDesc = rs("details")+"";
sDesc=sDesc.replace(/\r\n/g,"\\r\\n");
var sLink = ""; //list_content("link")
var sImage=rs("smallimage");
%>*/
sts_ai("i0",[0,"<%=sName%>","<%=sLink%>","_self","<%=sImage%>",80,158,"center"],["transparent","7pt Verdana,Arial","#000000","none","7pt Verdana,Arial","#000000","none"]);
sts_tip("i0",[0,"<%=sDesc%>","stEffect(\"rect\")","",80,0,0,0,"middle","center",1,1],["9pt Verdana,Arial","#000000","none","#FFFFFF","","repeat"]);
/*<%
rs.MoveNext();
}
connDynamic.Close();
%>
*/
sts_es();


Thank you.
Hope it's can help those who facing same problem as me. :)

Regards,
Michelle


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 02, 2008 3:26 pm 
Offline
Support Team
Support Team
User avatar

Joined: Thu Aug 01, 2002 5:59 pm
Posts: 1808
Thanks for the functional source code. :D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 1:02 pm 
Offline
Member

Joined: Thu Apr 03, 2008 3:26 pm
Posts: 16
would it work for mysql ?? :D


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 1:42 pm 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
chaz wrote:
would it work for mysql ?? :D

with the right connection string it will work for any data source


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 04, 2008 7:48 pm 
Offline
Member

Joined: Thu Apr 03, 2008 3:26 pm
Posts: 16
TheUsername wrote:
chaz wrote:
would it work for mysql ?? :D

with the right connection string it will work for any data source



examples please, to logon in the database; calling the tablename and fields


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 05, 2008 7:07 am 
Offline
Guru

Joined: Wed Jan 31, 2007 4:21 am
Posts: 1116
chaz wrote:
TheUsername wrote:
chaz wrote:
would it work for mysql ?? :D

with the right connection string it will work for any data source



examples please, to logon in the database; calling the tablename and fields

fuk, what you want? to be spoon fed?? go do some testing and searching for yourself, how you gonna learn anything being spoon fed???


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group