Feb 21, 2011

Execute SQL Action (Advanced SharePoint Designer 2010 Workflow Actions)

Execute a SQL statement from within a SharePoint Designer 2010 Workflow. The action and its source can be downloaded here.

Add “Execute SQL” Action to a SharePoint Designer 2010 Workflow

image

Configure the Action

image
  • SQL: The SQL statement that you want to execute. You could also use stored procedures e.g. “EXEC [test_Proc] @var1=N’test’ ”-You can use two special tokens in the statement that can not be inserted via the UI: [WebUrl] and [WorkflowInstanceId].
  • Provider: The .NET ADO Provider. Default is MS SQL Server (System.Data.SqlClient). You can use other providers like ODBC, Oracle…
  • Connection: The connection string e.g. “Server=localhost\SQLExpress;Database=test;User ID=sa;Password=P@ssw0rd”. Integrated Security is for security reasons not supported! You could either specify the password  in clear text or encrypted like described in [Encrypt Passwords for SharePoint Designer Workflow Actions].
  • Result: The first column of the first row in the result set returned by the query. Additional columns or rows are ignored.
  • AppId: The The Secure Store Application ID. The Secure Store App have to define 2 Fields. One of type “User Name” and one of type “Password”. The Field Name doesn’t matter, important is the Field Type! You have to map the credentials of the SharePoint Service Accounts (AppPool/owstimer.exe). The secure store option will only works with SharePoint Server not with Foundation! In order to use the credentials in the Connection String you can use the token {0} for the User Name and {1} for the password. E.g. “Server=localhost;Database=test;User ID={0};Password={1}”

Example

Simple insert statement.
image
Configuration of “Execute SQL”
  • SQL: INSERT INTO MyTable (Column1, Column2) VALUES ([%Current Items:ID%],’[%Current Items:Title%]’)
  • Provider: System.Data.SqlClient
  • Connection String: Server=localhost; Database=MyDatabase;User ID={0}; Password={1}
  • Secure Store AppId: DBCred ({0} in the connection string will be replaced with User Name and {1} with Password defined in the Secure Store App)
  • Output: Workflow Variable “Result” (will return 0)
Wiki Documentation

50 comments:

olive said...

First I would like to appreciate you for the valuable information sharing with us. Thanks for making informative blog.SharePoint designer 2010: Provides the designers with their tools of choice for rapid development of SharePoint application

Brian said...

Hi Christian,
Is it possible to use the execute SQL WF action to update a documents content type? For example I have all of my content types in a choice column. I want to set the actual content type to the value in that choice column. Is that possible? I keep getting syntax errors and everything looks right. Thanks.

Anonymous said...

i have deploy the wsp as global but i neither see ilovesharepoint feature to active nor in my sharepoint designer action

Christian said...

Seems that something with the deployment went wrong. Any log entries?
Bye,
Christian

Simon said...

Hi Christian,

Is it possible to execute a workflow that contains this action automatically (on list item creation or update) or does it have to be manually started? Thanks!

Web Designer said...

I am really impressed by this blog!Very clear explanation of issues is given and it is open to everyone.It contains true and fair information. Your website is very useful.

Seo Expert Web Services said...

The information and the detail were just perfect. I think that your perspective is deep, its just well thought out and really fantastic to see someone who knows how to put these thoughts down

digital signature software said...

It's wonderful that you devote time to articles like this where so many people can truly benefit. Thanks !

Xj Cheng said...

Even added difficult to chanel replica ascertain are what is frequently referred to as "frankenwatches." These timepieces,which cover Citizens,are accumulated from apparatus of different watch brands.The Rolex Oyster Perpetual is a archetypal watch that never goes out of style.This is a time section that has been to the acme of Mount Everest,sunk into replica watches the Pacific Ocean and broiled to 500 degrees F,and it still looked and performed great.Retail amount for a Rolex is $5,000 to $10,000,so bethink the adage,"You get what you pay for" if your acquaintance tells you he can get you one for just $1,000.One of the a lot of affecting realities about online replica handbags is louis vuitton replica that they are alleged as the affluence artist replica handbags.Replica handbags or actor handbags appeal is ascent these canicule maybe because the abridgement is still down or there are abounding barter that do not wish to absorb their money on cher affluence artist brands.Today,these kinds of handbags can be begin just gucci replica about anywhere there are even accessible in beating off food and arrangement stores.Surely,replica handbags attending like the 18-carat designs of affluence accoutrements that they wish to archetype or imitate.The decidedly cheaper amount of actor accoutrements is usually one of the affidavit why there are abounding humans abnormally the women buy them.Anyway,some replica handbags are superior backpack and a lot of of them are able-bodied fabricated and actor the attending of the branded ones.

Hug Day said...

hug day 2016 Images
happy hug day 2016 Date SMS Messages Quotes
Hug day Celebration Ideas For Him/Her
hug day sms for gf

dongdong said...

stephen curry shoes
canada goose jackets
michael kors outlet
michael kors uk
nike tn
babyliss flat iron
michael kors outlet
michael kors watches
coach outlet
polo ralph lauren outlet
michael kors outlet online
oakley sunglasses
reebok
nike air max
coach outlet online
coach outlet
burberry outlet
christian louboutin uk
reebok uk
michael kors outlet
coach factory outlet
christian louboutin uk
hermes belt
hollister co
versace
cartier glasses
pandora jewelry
fitflops shoes
louis vuitton outlet online
oakley store
valentino store
hollister sale
canada goose uk
coach outlet online
louis vuitton outlet
jordans shoes
coach outlet
kate spade outlet
toms shoes
armani exchange
20163.22wengdongdong

风骚达哥 said...

20160423 junda
air jordans
cheap oakley sunglasses
kate spade outlet
adidas stan smith
ray ban sunglasses
michael kors outlet
nike air max shoes
cheap omega watches
yeezy boost 350
michael kors outlet online
michael kors outlet online
nike free runs
air jordan uk
michael kors outlet online
pandora charms
ray ban outlet
calvin klein outlet
fitflops sale clearance
toms outlet
nike huarache white
sac longchamp
toms outlet
michael kors outlet clearance
bottega veneta outlet
armani watches
gucci handbags
nike blazer
oakley sunglasses
true religion jeans
cheap jordans
ray bans
hollister
bottega veneta handbags
jimmy choo outlet
oakley sunglasses
converse
prada outlet
reebok shoes
true religion
burberry outlet

Desty Lilian Rosana Putry said...

model meja belajar anak minimalis
warna cat rumah minimalis
model rak tv
model meja makan
taman kolam air
model pintu kamar mandi
model tangga rumah minimalis
warna cat pagar
desain tiang dan keramik teras
kursi sofa ruang tamu minimalis
model tempat tidur bayi
warna cat dapur
model atap rumah minimalis
model plafon minimalis
warna gorden ruang tamu
warna cat rumah tipe 45
model rumah idaman type 36

Libin Huang said...

20160426libinhollister clothing store
oakley sunglasses
michael kors handbags
tiffany outlet
ray-ban sunglasses
gucci outlet online
ray-ban sunglasses
burberry outlet online
coach outlet canada
ray-ban sunglasses
herve leger outlet
ray ban sunglasses sale
air max 90
oakley sunglasses
adidas wings shoes
michael kors outlet
michael kors factory outlet
louis vuitton bags
michael kors online outlet
nba jerseys
ralph lauren pas cher
oakley sunglasses
toms shoes
nike air max 90
nike tn pas cher
air max 90
lululemon outlet
nike air force 1
true religion outlet
michael kors outlet
burberry outlet store
ray ban sunglasses
kobe shoes
true religion outlet
discount michael kors handbags

Yuanyuan Lin said...

7.14llllllyuan"hollister shirts"
"true religion canada"
"true religion outlet"
"beats by dre"
"nike tn pas cher"
"ray ban sunglasses"
"tory burch outlet"
"mulberry handbags"
"prada outlet"
"michael kors outlet"
"tiffany outlet"
"louis vuitton neverfull"
"louis vuitton handbags"
"giuseppe zanotti shoes"
"nike uk store"
"michael kors wholesale"
"tiffany jewelry"
"michael kors outlet"
"ralph lauren pas cher"
"mulberry bags"
"nike air force 1"
"police sunglasses for men"
"gucci outlet online"
"ray ban sunglasses"
"jordan shoes"
"asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano"
"cheap jordan shoes"
"basketball shoes"
"fitflops sale"
"prada outlet online"
"ralph lauren polo"
"nike air max 90"
"omega outlet"
"lacoste shirts"
"longchamp outlet"
7.14

Fangyaya said...

fitflop sandals
polo ralph lauren outlet
rolex submariner price
michael kors outlet
christian louboutin wedges
ralph lauren polo
louboutin shoes
abercrombie and fitch outlet
coach outlet canada
michael kors outlet
gucci outlet online
cheap louis vuitton handbags
ray bans
cheap oakley sunglasses
copy watches
adidas nmd
michael kors handbags
oakley canada
cheap rolex watches
ray ban sunglasses wholesale
hollister kids
true religion outlet
burberry sale
nfl jerseys
burberry scarf
cheap air jordans
replica watches
coach outlet
oakley sunglasses wholesale
oakley outlet
michael kors uk
ray ban sunglasses
adidas outlet store
rolex watches for sale
cheap oakley sunglasses
adidas originals store
rolex watches
cheap true religion jeans
ralph lauren outlet
kobe 11 shoes
20168.8chenjinyan

Justin said...

Number of keeping money organizations give school credits to help learners figure out how to pay for their scholarly costs. Before considering private school credits however, an understudy ought to attempt to profit by government school advances because of endowment. https://www.usacheckcashingstore.com/san-diego

marko said...

Be it for educational costs, paying lodging expenses, convenience, books and devices like PCs, for instruction and so forth. There is no confinement on the use of advance as long it is identified with the training itself. https://www.usacheckcashingstore.com/san-diego

Paulo said...

The requirements have an extremely contract definition that incorporates not more than essential necessities. For every single other need, understudies need to rely on upon outer sources like companions and moneylenders. https://www.usacheckcashingstore.com/san-diego

dada24 Xu said...

christian louboutin
true religion jeans
cheap mlb jerseys
nike store
longchamp handbags
cheap jordans
ralph lauren outlet
louis vuitton outlet
red bottoms shoes
louis vuitton bags
2061921caiyan

Studio 45 Wedding said...

An impressive share! I’ve just forwarded this onto a co-worker who
has been conducting a little homework on this. And he actually bought me dinner
because I stumbled upon it for him… Ahli dan Pakar SEO di Indonesia lol. So allow me to reword this….
Thank YOU for the meal!! But yeah, thanks for spending some
time to discuss this subject here on your web page.

John said...

michael kors outlet canada
kd shoes
longchamp handbags
north face jackets
ralph lauren uk
coach outlet store online
christian louboutin sale
burberry outlet
pandora bracelet
ugg outlet
ray ban sunglasses outlet
canada goose coats
coach factory outlet online
coach factory outlet online
yeezy boost
red bottom shoes for women
longchamp outlet store
gucci outlet online
canada goose jackets
true religion uk
raybans
cheap nike shoes
pandora charms sale
burberry outlet online
nike air force
uggs
ugg outlet online
cheap ray ban sunglasses
cheap oakley sunglasses
polo ralph lauren
true religion outlet store
ugg boots outlet
mlb jerseys
20161102yuanyuan

Meiqing Xu said...

ugg boots on sale
converse outlet
rolex daytona
polo ralph lauren outlet online
coach outlet
cheap nfl jerseys
timberland boots outlet
rolex watches
true religion jeans
gucci outlet
2016121caiyan

chenmeinv0 said...

michael kors
nike air max 2017
longchamp handbags
timberland boots
adidas trainers
converse shoes
mizuno running shoes
ray ban canada
true religion outlet
cheap jordan shoes
hzx20170228

dong dong23 said...

the north face jackets
ray ban sunglasses
coach factory online
ray ban wayfarer
pandora charms
cheap oakley sunglasses
valentino sandals
christian louboutin outlet
burberry scarf
vans store
2017.5.11chenlixiang

شركة المثالية لتنظيف said...


شركة تسليك مجارى بالرياض

Teresa Hamilton said...

Thank you for sharing! This is what I need to find. instagram online

raybanoutlet001 said...

coach outlet online
cheap oakley sunglasses
ugg boots
louboutin shoes
michael kors outlet
eagles jerseys
replica watches
polo ralph lauren
oakley sunglasses
michael kors bags

Best Construction Company City of Yonkers said...

The team at Ajrin Construction Inc. is the best of the best general contractors and support staffs, as selected from within the industries over City of Yonkers NY based upon their achievements and their understanding of complex projects.
Best Construction Company City of Yonkers

قمة الخليج said...


شركة تنظيف
شركة ركن المثالية تهتم بخدمات التنظيف بشكل عام فى اى مكان فالتنظيف من الخدمات المطلوبة لاستكمال الحياة والتخلص من الكثير من الضغوط والتوتر والتخلص من اى مشكلة تتعرض انتشار الطاقة السلبية فى المكان ، يمكن في أول أن نقسيم تنظيف يومي أو أسبوعي أوشهري أونصف سنوي أو سنوي.
شركة تنظيف مجالس بالرياض
فتح الشبابك الغرف ليتجدد الهواء ودخول الشمس وتطهر من الجراثيم والبكتريا التي لاتراي إلا بالعين المجرده ، بعد ذلك تنظيف السجاد بالمكنسه الكهربائية ورفعه ، وتلميع المريا حتي تكون لأمعه ...
شركة تنظيف كنب بالرياض
وتنظيف الاريكه من الأترابة جيد ،يمكنا تحضير نصف كوب من الخل الأبيض علي نصف كوب من الماء الفاتر واختلاطهم مع بعض ،ثم بلي قطعة من القماش الناعمة في الخلايط وأفركي بها الكنب من أعلي إلي أسفل لأزالة بقع الغبار والعفن ونتركها حتي تجف تماماً ، وبعد ذلك بقطعة من القماش مبللة تم مسحها ،وثم بعد ذلك مسحها بقماش جافة . شركة تنظيف فلل بالرياض

و بتلميع الأشياء الصغير التي تعرض للمس المتكرر مثل أزرار النور و التليفون و الريموت كونترول يجب تظيفها جيد لآنها تتجمع عليه البكتيريا بكثرة وعاده ما تنسي أثناء التنظيف. تنظيف الحوائط من الأتربة والعنكبوت ومسح التحف والأكسسوارات والتلفزيون والكماليات بقماش نظيفه من التراب اولا ، ثم مسح مرة تانية بقماش بها مطهر لقتل الجراثيم . شركة تنظيف كنب بالرياض
والعناية جيد بالمواسير الحوض وصيانتها و حتي لاتتسرب منها المياه وتصبح رائحة الحمام غير مستحب ، والعنايه أيضا بخرطوم الغسالة حتي يتسرب منه المياه ، وتهوية الحمام جيد والعنايه بفوط الحمام وتكون نظيفة ومعقمه ورائحة مستحبة، والعمل علي تجميل المرحاض والحمام بضع بعض الزهور وفواحة للتطيب ، ويجب تنظيف المرحاض يوميا حتي لاتتراكم الجراثيم
شركة دهانات وديكورات بالرياض
وغسيل الأوني الطعام أول بأول لاترك في الحوض حتى لاتكون عرضه للأنتشار الحشرات ، وغسل الرخام المطبخ أو سطح المطبخ بنصف ليمونه حتي يزيل الدهون وأثر العفن وثم مسحها جيد بالقماش ،مسح الشفاط المطبخ من أثر الدهون والأترابه المتراكمه عليه وحتي يمكن اسخدمه مرة أخرى لتنقيه الهواء شركة تنظيف واجهات زجاج بالرياض
،و العناية بالثلاجة جيد التي يحفظ بها الأطمعة بتخلص بأي شئ عفن سواء خضروات أو فواكهة أو أطمعة لا مستحبه ، وغسلها جيد بالمطهروالمياه ومسحها جيد من المياه وتركها تجف،و بذلك المطبخ يكون جيد ورايحة ذكية. شركة تنظيف واجهات حجر بالرياض
زيت الافندر يمكن وضع قليل منه للمكنسة الكهربائية الرائحة الجملية سوف تعم المكان .
لتلميع الزجاج يستخدم الخل بورق الجرائد وقليل من الخل ، ويمكن تنظيف الحمام بقليل من عصير الليمون ويضاف الى الماء فينظف ويطهر ويلمع ومع اضافة الخل تكون النتيجة مبهرة ، والخل الأبيض فى تنظيف الرخام والأرضية .

Gabe Co Hadwin said...

Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging. If anyone wants to become a Front end developer learn from Javascript Training in Chennai . or learn thru JavaScript Online Training in India. Nowadays JavaScript has tons of job opportunities on various vertical industry. JavaScript Training in Chennai

洛噷 said...

2018120 leilei3915
michael kors outlet online
true religion outlet online
vintage nhl jerseys
mulberry handbags
uggs outlet
coach outlet
adidas superstar shoes
jordan retro shoes
michael kors outlet
cheap ugg boots

dong dong23 said...

nike blazer shoes
michael kors handbags
supreme clothing
ugg
burberry sale
cheap nfl jerseys
nike outlet
adidas
true religion outlet
ugg clearance
20183.14wengdongdong

Obat Untuk Mengatasi Perut Kembung said...

The article was very nice and very interesting to read. Thank you for sharing the information

Obat Ulu Hati Terasa Sesak
Obat Pendarahan Usus
Obat Maag Ringan
Obat Ginjal Berkista
Pengobatan Alternatif Radang Sendi
Obat Tradisional Iritasi Lambung

SSSSSS said...

adidas superstars
air force 1
lacoste outlet
adidas nmd
adidas tubular shadow
adidas yeezy
goyard bags
yeezy boost 350 v2
lebron james shoes
tom ford eyewear

Pengobatan Radang Selaput Otak (Meningitis) said...

Very interesting information, may be useful for everything

Cara Alami Mengobati Hepatitis
Pengobatan Sirosis Hati
Pengobatan Tradisional Atasi Patah Tulang
Cara Melancarkan Haid Tidak Lancar/Tidak Teratur
Cara Ampuh Obati Vitiligo
Obat Atasi Keputihan Yang Bau Dan Gatal

raybanoutlet001 said...

zzzzz2018.5.9
canada goose outlet
ralph lauren outlet
oakley sunglasses wholesale
cleveland cavaliers jerseys
adidas outlet
jordans
christian louboutin shoes
oakley sunglasses
moncler outlet
christian louboutin shoes

Rijal Mulyadi said...


terimakasih, telah mendapatkan sesuatu yang baru dan salut atas keorsinilan cerita ini semoga bermanfaat, agar hidup ini lebih berguna dan bemannfaat bagi sesama

Obat Telinga Infeksi

Obat Patah Tulang

Obat Maag

Obat Keputihan

Obat Kista Bartholin

Obat Jantung Bocor

Obat Epilepsi

Obat Gagal Jantung

Obat Psoriasis

Obat Sakit Kencing
Obat Jantung Bocor

apotek k24 said...

obat aborsi
jual obat aborsi
obat penggugur kandungan
obat aborsi tradisional
obat aborsi 1 bulan
obat aborsi 2 bulan
obat aborsi 3 bulan
obat aborsi 4 bulan
obat aborsi 5 bulan
obat aborsi 6 bulan

hilda farida said...

obat patah tulang terbaik paling ampuh dengan ramuan tradisional yang berbentuk cairan karena obat tulang patah mampu mengobati berbagai macam penyakit termasuk untuk dijadikan sebagai obat tulang retak pada anak dan lansia oleh sebab itu obat untuk patah tulang ini sangat kami rekomendasikan untuk anda yang menderita cidera pada tulang. bahan dasar dari jelly gamat obat patah tulang tangan adalah teripang emas yang dolah secara modern sehingga terciptalah suplemen kalsium untuk patah tulang yang bisa menyembuhkan tulang retak tanpa harus pasang pen. selain obat untuk tulang patah jelly gamat juga berguna untuk pengobatan asma, asam urat, vitiligo, maag dan banyak lagi. jika untuk menyembuhkan obat patah tulang
cara pemakaiannya adalah dengan dioles karena obat penyambung tulang patah ini berbentuk cairan dan diminum juga bisa.
kata kunci:
obat penyembuhan patah tulang
suplemen untuk patah tulang
obat tulang retak di apotik
obat patah tulang di apotik
obat penyambung tulang
obat untuk tulang retak
vitamin untuk patah tulang
obat patah tulang kaki
obat herbal patah tulang
suplemen patah tulang
obat kalsium untuk patah tulang

Rino Febri said...

Do not forget to visit our website to share information and knowledge about health.
obat budug gudik di apotik
obat kliyengan paling ampuh
cara mengobati radang panggul
cara mengobati radang panggul

dong dong23 said...

burberry canada
balenciaga shoes
supreme uk
ray ban sunglasses
mlb jerseys
kate spade outlet
kd shoes
onitsuka tiger shoes
ralph lauren outlet
maglie calcio a poco prezzo
20187.27chenjinbei

chenmeinv0 said...

marc jacobs handbags
marc jacobs handbags
michael kors outlet online
air max
jordan shoes
clarisonic mia
montres
links of london uk
reebok outlet
jordan clothing
2018.8.15xukaimin

Yaro Gabriel said...

www0816
ugg boots clearance
polo ralph lauren
longchamp outlet
mbt shoes outlet
cheap nhl jerseys
cheap nba jerseys
skechers shoes
ugg boots clearance
skechers outlet
ferragamo shoes

洛噷 said...

2018914 leilei3915
pandora charms
louboutin shoes
adidas nmd r2
michael kors outlet
michael kors outlet online
michael kors
oakley sunglasses wholesale
oakley sunglasses wholesale
coach factory outlet
coach factory outlet

easy your sustenance said...

I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information and knowledge about health.
obat penyakit hisprung
obat batuk herbal
cara mengatasi penyakit ispa
Hopefully, sustenance will be easy and simplified in all matters :-)
OBAT LUKA BAKAR ALAMI
cara mengobati ambeien
obat jantung berdebar

Monuth Haurs said...

I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information and knowledge about health.
khasiat walatra hexabumin
khasiat vitamin hexabumin
Cara mengobati cacar Air
OBAT BATU GINJAL ALAMI
cara terbaik menumbuhkan jaringan daging
Cara Menaikan trombosit

5689 said...

zzzzz2018.11.15
new balance shoes
bottega veneta
nike shoes
moncler outlet
nba jerseys
christian louboutin outlet
fitflops clearance
canada goose outlet
adidas outlet
longchamp outlet

5689 said...

zzzzz2018.11.15
hogan shoes
coach outlet
christian louboutin shoes
nike shoes
canada goose
canada goose jacket
salomon shoes
ralph lauren polo
canadian goose
pandora outlet

Yaro Gabriel said...

www11.17



ray ban sunglasses
ugg boots
birken stock
dsquared2
coach outlet
coach outlet online
louboutin shoes
coach outlet
jordans
pandora charms