Highlighted

How can ı connect the local database?

Explorer ,
Sep 16, 2019

Copy link to clipboard

Copied

hello ,

Iam workıng at local database.I add a new database.ıts workıng.but ı dont know that how can ı connect ıt?Are there any wrong at code?

table name: KAYITYEN

Datasource:DENEME

 

<cfquery name="ADD_BUDGET" datasource="#DENEME#">

                                               INSERT INTO

                                                               KAYITYEN

                                               (

                                                 AD,

                                                 SOYAD

                                               )

                                               VALUES

                                               (

                                                               <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.AD#">,

                                                               <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.SOYAD#">

                                                               )

                                                              

                               </cfquery>

 

Views

176

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How can ı connect the local database?

Explorer ,
Sep 16, 2019

Copy link to clipboard

Copied

hello ,

Iam workıng at local database.I add a new database.ıts workıng.but ı dont know that how can ı connect ıt?Are there any wrong at code?

table name: KAYITYEN

Datasource:DENEME

 

<cfquery name="ADD_BUDGET" datasource="#DENEME#">

                                               INSERT INTO

                                                               KAYITYEN

                                               (

                                                 AD,

                                                 SOYAD

                                               )

                                               VALUES

                                               (

                                                               <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.AD#">,

                                                               <cfqueryparam cfsqltype="cf_sql_varchar" value="#attributes.SOYAD#">

                                                               )

                                                              

                               </cfquery>

 

Views

177

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 16, 2019 0
Adobe Community Professional ,
Sep 17, 2019

Copy link to clipboard

Copied

I moved this to the Cold Fusion forum. I guess that is where it belongs. If not, please state the Adobe program you're using...

Regards,
Abambo
Hard- and Software Engineer and Photographer

I'm not an Adobe employee. All advice constitutes my own opinion. Use at your risk! 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2019 0
Adobe Community Professional ,
Sep 17, 2019

Copy link to clipboard

Copied

You ask how you can "connect" the database, though it's "working". So are you saying you HAVE created the datasource (DENEME) and CAN query it from cf, but that THIS one query fails? What is the error?

 

And looking at the code, you refer to your variables with the attributes scope. That has a very specific meaning--that the code is running inside a cf "custom tag" template. If your code is not in such a custom tag, you should not be using that attributes scope.

 

From your two most recent questions, it sounds like you are brand new to CF. If so, welcome. But what introductory resources have you read? If you're just copying code snippets from various places and trying to make them work, that will prove challenging.

 

I'd recommend you check out any of the many intro resources I list here :

 

http://www.cf411.com/cftrainingfree

 

Especially "learn cf in a week", "learn cfml in 100 minutes", "learn modern cfml in 100 minutes", all from community members, or the several hours of "getting started" videos from Adobe. Even just an hour in any one of these should help at the level it seems you may be at. Apologies if I have misread your level of experience with CF. As always, just trying to help. 

/Charlie (server troubleshooter, carehart.org)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2019 0
Explorer ,
Sep 17, 2019

Copy link to clipboard

Copied

yeah ıam new true.Thank u ı wıll at them.and ı can solve now connect,query lıke thıs.Now ı must solve add,delete and like that

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 17, 2019 0