Viewing database through a webpage - with XMpie?

38 views
Skip to first unread message

JasonSpr

unread,
Nov 12, 2009, 3:12:34 PM11/12/09
to XMPie Interest Group
After completing a Rurl (thanks to the help given in my previous post
here!) the customer would like to be able to view the updated contents
of the MSsql Express database through a website. Anyone have any
interesting ideas for achieving this using XMPie, or if not, another
method? I'd like to be able to provide a website with a drop down for
selecting which rid to view, and also an option to view the entire
database at once.

Cheers,
-Jason

Bill

unread,
Nov 12, 2009, 3:36:43 PM11/12/09
to XMPie Interest Group
Doing this with XMPie "genuine code" might require the usage of
uProduce APIs (as I do not think uCreate XM allows you to list a
series of recipients). See InteractiveCampaign.GetADORsValuesForRange,
etc.

Doing this with a Dreamweaver Database connection to MySQL would
certainly require less code, but will certainly require some ODBC
driver (or OLE?), and be less XMPie compliant.

As you certainly noticed, the first method will provide data kindly
processed by ADORs, while the second one will provide raw data,
directly from the database columns.

As often, each method has got its own advantages and inconvenients.

Timothy Perrett

unread,
Nov 12, 2009, 5:56:26 PM11/12/09
to XMPie Interest Group
This is always an interesting one. I recently wrote an API abstraction
that lets me do the following types of queries on ICP:

// receives all recipients on that icp port
Visitor.findAll

// recives a single recipient by id
Visitor.find("whateverid")

// recives multiple recipients by id
Visitor.find("whatever" :: "another" :: Nil)

// get a range of recipients on a zero-index array
Visitor.find(4,8)

// create new recipient and set declarative ador values
new Visitor().someAdor("VALUE").another_ador("value").save

OK, so what does this mean? Well, it means that its possible to write
all manner of cool abstractions on ICP and do quite a lot more than is
possible through the default uCreate XM tooling (which I find to be
restrictive) - ICP can be fairly flexible given enough knowledge about
what it can and cant do. My advice would be to call the service
directly and do (as bill suggests) a range-all call then manipulate
the result with code - functionally speaking, what you want can be
done fairly easily.

You could write an abstraction, as I have, and achieve all manner of
cool things. To give you an idea, what you could do using my version
would be:

// extra credit for those recognising the lambda expression!
Visitor.findAll.flatMap(visitor => bind(
// ... binding goes here ...
))

Cheers, Tim

JasonSpr

unread,
Nov 12, 2009, 6:25:51 PM11/12/09
to XMPie Interest Group
In other words I have quite a bit of work ahead of me. I understand
the principles of what you're saying, and it sure would be nice to
have a function that can return whole columns or whole rows of data -
unfortunately the methods that you are describing are slightly over my
head. For example, I'm not even sure where to put the code, or how to
load it. Can you help with this, or am I better off emailing the IT
guys?
> > > -Jason- Hide quoted text -
>
> - Show quoted text -

Timothy Perrett

unread,
Nov 12, 2009, 6:39:23 PM11/12/09
to XMPie Interest Group
Yes and no :-) I kinda went a little over-board in my last response;
sorry about that! I didn't mean to scare you off - im just quite into
deep abstractions and service layers.

What language are you programming in? You can make a straight API call
pretty easily from most languages - do you have any technical skill
outside dreamweaver in terms of programming? If you want to use .NET
still then its quite simple as SOAP is well supported in that
environment.

Cheers, Tim

JasonSpr

unread,
Nov 13, 2009, 12:11:13 AM11/13/09
to XMPie Interest Group
I'm not using anything other than C#, Java, and HTML. I'm used to
coding in a text editor, so basically I'm just using Dreamweaver for
the XMpie plugin. That's all I really have available to me although
Python is always there. What's your opinion on how to go about this,
given that set of tools?

Cheers
-Jason

Timothy Perrett

unread,
Nov 13, 2009, 1:30:39 AM11/13/09
to xmpie...@googlegroups.com
In that case, just write some C# to make the SOAP call to:

http://yourserver/xmpiewsapi/interactivecampaign_ssp.asmx?wsdl

As previously suggested, you then need to invoke the
GetAdorValuesForRange method and pass the following range: 0,-1

That will get all the recipients in the database.

Cheers, Tim

Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages