• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can ı connect the local database?

Explorer ,
Sep 16, 2019 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

253

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
community guidelines
Community Expert ,
Sep 17, 2019 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...

ABAMBO | Hard- and Software Engineer | Photographer

Votes

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
community guidelines
Community Expert ,
Sep 17, 2019 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 (troubleshooter, carehart.org)

Votes

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
community guidelines
Explorer ,
Sep 17, 2019 Sep 17, 2019

Copy link to clipboard

Copied

LATEST
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

Votes

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
community guidelines
Resources
Documentation